Adds a specified number of days, months, and years to the current date. You can specify whether offsets are relative to the current date or absolute values.
Input Parameter Sequence |
Description |
---|---|
1 |
Year offset. The value to add to the year. Can be positive or negative. |
2 |
Year offset type. Whether the value in parameter 1 is relative to the current year or is an absolute value, such as 2008. Valid values: 1 (Relative to Current Date), 2 (Absolute Value). |
3 |
Month offset. The value to add to the month. Can be positive or negative. |
4 |
Month offset type. Whether the value in parameter 3 is relative to the current month or is an absolute value. Valid values: 1 (Relative to Current Date), 2 (Absolute Value). |
5 |
Day offset. The value to add to the day. Can be positive or negative. |
6 |
Day offset type. Whether the value in parameter 5 is relative to the current day or is an absolute value. Valid values: 1 (Relative to Current Date), 2 (Absolute Value). |
7 |
Hours. Set the hours component of date string to this value. |
8 |
Minutes. Set the minutes component of date string to this value. |
9 |
Seconds. Set the seconds component of date string to this value. |
Output Parameter Sequence |
Description |
---|---|
1 |
Microsoft Dynamics CRM datetime attribute in which to put the new date. |
Sample Advanced Add to Current Date Transformation
This sample shows adding a year and day relative to the current year and day, and setting the month to 1 (January). The time is set to 1:01:01.
<Map Name="sample_contact_advanced_add_to_current_date">
<Description>Sample map showing Advanced 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 <specialCharacter name="greater_than"/>
<TransformationTypeName>Microsoft.Crm.Transformations.AdvancedAddToCurrentDate<T/ransformationTypeName>
<ProcessCode>Process</ProcessCode>
<InputParameterMaps>
<SingletonInputParameterMaps>
<SingletonInputParameterMap>
<ParameterSequence>1</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>2</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>3</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>4</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>0</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>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>8</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
<SingletonInputParameterMap>
<ParameterSequence>9</ParameterSequence>
<DataTypeCode>Value</DataTypeCode>
<Data>1</Data>
</SingletonInputParameterMap>
</SingletonInputParameterMaps>
<ArrayInputParameterMaps/>
</InputParameterMaps>
<OutputParameterMaps>
<OutputParameterMap>
<ParameterSequence>1</ParameterSequence>
<Data>description</Data>
</OutputParameterMap>
</OutputParameterMaps>
</TransformationMap>
</TransformationMaps>
</EntityMap>
</EntityMaps>
</Map>