Integration Cloud 6.1.0 | Built-In Services | Built-In Services | incrementDate
 
incrementDate
Increments a date by a specified amount of time.
Input Parameters
startDate
String Starting date and time.
startDatePattern
String Format in which the startDate parameter is specified (for example, yyyyMMdd HH:mm:ss.SSS). For pattern-string notation, see the "Pattern String Symbols" section.
endDatePattern
String Optional. Pattern representing the format in which you want the endDate to be returned. For pattern-string notation, see the "Pattern String Symbols" section.
If no endDatePattern is specified, the endDate will be returned in the format specified in the startDatePattern parameter.
addYears
String Optional. Number of years to add to startDate. The value must be an integer between -2147483648 and 2147483647.
addMonths
String Optional. Number of months to add to startDate. The value must be an integer between -2147483648 and 2147483647.
addDays
String Optional. Number of days to add to startDate. The value must be an integer between -2147483648 and 2147483647.
addHours
String Optional. Number of hours to add to startDate. The value must be an integer between -2147483648 and 2147483647.
addMinutes
String Optional. Number of minutes to add to startDate. The value must be an integer between -2147483648 and 2147483647.
addSeconds
String Optional. Number of seconds to add to startDate. The value must be an integer between -2147483648 and 2147483647.
addMilliSeconds
String Optional. Number of milliseconds to add to startDate. The value must be an integer between -2147483648 and 2147483647.
timezone
String Optional. Time zone in which you want the endDate to be expressed. Specify a time zone code, for example, EST for Eastern Standard Time.
If you do not specify timezone, the value of the server's "user timezone" property is used. If this property has not been set, GMT is used.
locale
String Optional. Locale in which the endDate is to be expressed. For example, if locale is en (for English), the pattern EEE d MMM yyyy will produce Friday 23 August 2002, and the locale of fr (for French) will produce vendredi 23 août 2002.
Output Parameters
endDate
String The end date and time, calculated by incrementing the startDate with the specified years, months, days, hours, minutes, seconds, and/or milliseconds. The endDate will be in the endDatePattern format, if specified. If no endDatePattern is specified or if blank spaces are specified as the value, the endDate will be returned in the format specified in the startDatePattern parameter.
Usage Notes
The addYears, addMonths, addDays, addHours, addMinutes, addSeconds, and addMilliSeconds input parameters can take positive or negative values. For example, If startDate is 10/10/2001, startDatePattern is MM/dd/yyyy, addYears is 1, and addMonths is -1, endDate will be 09/10/2002.
If you specify only the startDate, startDatePattern, and endDatePattern input parameters and do not specify any of the optional input parameters to increment the period, the incrementDate service just converts the format of startDate from startDatePattern to endDatePattern and returns it as endDate.
Note: 
The format of the date specified in the startDate parameter must match the format specified in the startDatePattern and the format of the date specified in the endDate parameter must match the endDatePattern format.