Add to Date

Adds a specified number of days, months, and years to a date.

Input Parameter Sequence

Description

1

Date. The source column containing the date to transform.

2

Year offset. The value to add to the year. Can be positive or negative.

3

Month offset. The value to add to the month. Can be positive or negative.

4

Day offset. The value to add to the day. Can be positive or negative.

Output Parameter Sequence

Description

1

Microsoft Dynamics CRM field in which to put the new date string.

Note that the values are added in order: first the day (parameter 4) is added, then the month (parameter 3), and then the year (parameter 2).

Sample Add to Date Transformation

This sample shows adding three months to the initial_contact_date and stores the information in the new_followup_date attribute.

<Map Name="sample_contact_add_to_date">

<Description>Sample map showing Add To 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.AddToDate</TransformationTypeName>

<ProcessCode>Process</ProcessCode>

<InputParameterMaps>

<SingletonInputParameterMaps>

<SingletonInputParameterMap>

<ParameterSequence>1</ParameterSequence>

<DataTypeCode>Reference</DataTypeCode>

<Data>Source_initial_contact_date</Data>

</SingletonInputParameterMap>

<SingletonInputParameterMap>

<ParameterSequence>2</ParameterSequence>

<DataTypeCode>Value</DataTypeCode>

<Data>0</Data>

</SingletonInputParameterMap>

<SingletonInputParameterMap>

<ParameterSequence>3</ParameterSequence>

<DataTypeCode>Value</DataTypeCode>

<Data>3</Data>

</SingletonInputParameterMap>

<SingletonInputParameterMap>

<ParameterSequence>4</ParameterSequence>

<DataTypeCode>Value</DataTypeCode>

<Data>0</Data>

</SingletonInputParameterMap>

</SingletonInputParameterMaps>

<ArrayInputParameterMaps/>

</InputParameterMaps>

<OutputParameterMaps>

<OutputParameterMap>

<ParameterSequence>1</ParameterSequence>

<Data>new_followup_date</Data>

</OutputParameterMap>

</OutputParameterMaps>

</TransformationMap>

</TransformationMaps>

</EntityMap>

</EntityMaps>

</Map>

Did you find the information that you need?
Yes      No 
If not, what information do you need? (optional)