Decodes a date into a dynamic array of information about that date.

Info = SRP_Date("Decode", Date)

Returns

An @FM delimited array of information about the date. See Remarks.

Parameters

ParameterDescription
DateA date in OI internal format. (REQUIRED)

Remarks

The "Decode" service breaks down an OI date into an @FM delimited array of information about the date. The structure of the returned array is as follows:

FieldDescriptionSee Also
<1>
The year component of the date.Year
<2>
The month component of the date. 1 - 12.Month
<3>
The day component of the date. 1 - 31.Day
<4>
The day of the year.DayOfYear
<5>
The day of the week. 1 = Monday, 7 = Sunday.DayOfWeek

For example, if the OI date represents March 30, 1978, the result would be:

1978:@FM:3:@FM:30:@FM:89:@FM:4

Examples

// Decode today's date
Info = SRP_Date("Decode", Date())

// Decode the current UTC date
Info = SRP_Date("Decode", SRP_Date("Today", 1))

// Decode a hard coded date
Info = SRP_Date("Decode", -9519)

// Decode a date that's formatted in a string
Date = SRP_Date("Parse", "Thursday, March 30, 1978", "DDD, MMMM D, YYYY")
Info = SRP_Date("Decode", Date)