Adds a specified number of days, months, and years to the current date, and sets specified time.
Input Parameter Sequence |
Description |
---|---|
1 (optional) |
Year offset. The value to add to the year. Can be positive or negative. |
2 (optional) |
Month offset. The value to add to the month. Can be positive or negative. |
3 (optional) |
Day offset. The value to add to the day. Can be positive or negative. |
4 (optional) |
Date and time. Set the hours component of date string to this value. |
5 (optional) |
Minutes. Set the minutes component of date string to this value. |
6 (optional) |
Seconds. Set the seconds component of date string to this value. |
7 (optional) |
Day of week. Set the day of week component of date string to this value. If this value contradicts the day calculated using the value from parameter 3, the day will be set to the specified day of week, and will use the closed day just prior to the calculated day. Valid values: empty, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday. |
Output Parameter Sequence |
Description |
---|---|
1 |
Microsoft Dynamics CRM datetime attribute in which to put the new date. |
Sample Add to Current Date Transformation
This sample shows setting the target new_review_date to three months from the current date.
<Map Name="sample_contact_add_to_currentdate">
<Description>Sample map showing Add To Current Date Transformation</Description>
<EntityMaps>
<EntityMap TargetEntityName="contact" SourceEntityName="Source_contact">
<AttributeMaps>
<AttributeMap>
<SourceAttributeName>Source_lastname</SourceAttributeName>
<TargetAttributeName>lastname</TargetAttributeName>
<ProcessCode>Process</ProcessCode>
<AttributeMap>
</AttributeMaps>
<TransformationMaps>
<TransformationMap>
<TransformationTypeName>Microsoft.Crm.Transformations.AddToCurrentDate</TransformationTypeName>
<ProcessCode>Process</ProcessCode>
<InputParameterMaps>
<SingletonInputParameterMaps>
<SingletonInputParameterMap>
<ParameterSequence>1</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>2</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>3</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>3</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>4</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>4</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>5</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>5</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>6</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>7</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>3</Data>
</SingletonInputParameterMap>
</SingletonInputParameterMaps>
<ArrayInputParameterMaps/>
</InputParameterMaps>
<OutputParameterMaps>
<OutputParameterMap>
<ParameterSequence>1</ParameterSequence>
<Data>new_review_date</Data>
</OutputParameterMap>
</OutputParameterMaps>
</TransformationMap>
</TransformationMaps>
</EntityMap>
</EntityMaps>
</Map>