The number of days between dates.

Days = SRP_Date("DaySpan", FromDate, ToDate)

Returns

The number of days between two dates

Parameters

ParameterDescription
FromDateA starting date in OI internal format. (REQUIRED)
ToDateAn ending date in OI internal format. (REQUIRED)

Remarks

The "DaySpan" service calculates the number of days between two dates. The result will be positive if the starting date comes before the ending date and negative if the ending date comes first.

Examples

// Get the number of days between two dates
From = SRP_Date("Parse", "Monday, December 8, 1941", "DDD, MMMM D, YYYY")
To = SRP_Date("Parse", "Thursday, March 30, 1978", "DDD, MMMM D, YYYY")
Days = SRP_Date("DaySpan", From, To)
  • No labels