A date's year.

Year = SRP_Date("Year", Date)

Returns

The year component of an OI date.

Parameters

ParameterDescription
DateA date in OI internal format. (REQUIRED)

Remarks

The "Year" service returns the year component of an OI date. For example, if an OI date represents March 30, 1978, this service would return 1978. If the given date not valid, "" is returned.

Examples

// Get the current year
Year = SRP_Date("Year", Date())

// Get the current year in UTC
Year = SRP_Date("Year", SRP_Date("Today", 1))

// Get a hard coded date's year
Year = SRP_Date("Year", -9519)

// Parse a date's year
Date = SRP_Date("Parse", "Thursday, March 30, 1978", "DDD, MMMM D, YYYY")
Year = SRP_Date("Year", Date)
  • No labels