A datetime's year.

Year = SRP_DateTime("Year", Datetime)

Returns

The year component of an OI datetime.

Parameters

ParameterDescription
DatetimeA datetime in OI internal format. (REQUIRED)

Remarks

The "Year" service returns the year component of an OI datetime. For example, if an OI datetime represents March 30, 1978 at 12:41:08pm, this service would return 1978. If the given datetime not valid, "" is returned.

Examples

// Get the current year
Year = SRP_DateTime("Year", DateTime())

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

// Get a hard coded datetime's year
Year = SRP_DateTime("Year", -9519.67241898148)

// Parse a datetime's year
Date = SRP_DateTime("Parse", "Thursday, March 30, 1978 at 12:41:08pm", "DDD, MMMM D, YYYY at h:mm:sstt")
Year = SRP_DateTime("Year", Date)
  • No labels