You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

A date's day of the week.

DayOfWeek = SRP_Date("DayOfWeek", Date)

Returns

An integer between 1 and 7: 1 = Monday, 7 = Sunday.

Parameters

ParameterDescription
DateAn date in OI internal format. (REQUIRED)

Remarks

The "DayOfWeek" service returns the day of the week component of an OI date, which is assumed to be in OI's internal format. The day of the week is returned as an integer between 1 and 7, with 1 being Monday and 7 being Sunday. For example, if an OI date represents March 30, 1978, this service would return 4, since that date falls on a Thursday. If the given date is not a valid date, "" is returned.

Examples

// Get today's day of the week
DayOfWeek = SRP_Date("DayOfWeek", Date())

// Get today's day of the week in UTC
DayOfWeek = SRP_Date("DayOfWeek", SRP_Date("Today", 1))

// Get a hard coded date's day of the week
DayOfWeek = SRP_Date("DayOfWeek", -9519)

// Parse a date's day of the week
Date = SRP_Date("Parse", "Thursday, March 30, 1978", "DDD, MMMM D, YYYY")
DayOfWeek = SRP_Date("DayOfWeek", Date)
  • No labels