Integration Cloud 6.6.0 | Built-In Services | Built-In Services | calculateDateDifference
 
calculateDateDifference
Calculates the difference between two dates and returns the result as seconds, minutes, hours, and days.
Input Parameters
startDate
String Starting date and time.
endDate
String Ending date and time.
startDatePattern
String Format in which the startDate parameter is to be specified (for example, yyyyMMdd HH:mm:ss.SSS). For pattern-string notation, see the “Pattern String Symbols” section.
endDatePattern
String Format in which the endDate parameter is to be specified (for example, yyyyMMdd HH:mm:ss.SSS). For pattern-string notation, see the “Pattern String Symbols” section.
Output Parameters
dateDifferenceSeconds
String The difference between the startingDateTime and endingDateTime, truncated to the nearest whole number of seconds.
dateDifferenceMinutes
String The difference between the startingDateTime and endingDateTime, truncated to the nearest whole number of minutes.
dateDifferenceHours
String The difference between the startingDateTime and endingDateTime, truncated to the nearest whole number of hours.
dateDifferenceDays
String The difference between the startingDateTime and endingDateTime, truncated to the nearest whole number of days.
Usage Notes
Each output value represents the same date difference, but in a different scale. Do not add these values together. Make sure your subsequent Integration steps use the correct output, depending on the scale required.