Icon WeekDayOf

Unit: Internal

Available In: Client and Server Applications

function WeekDayOf(Value: DateTime; UTC: Boolean=False): Integer

The WeekDayOf function returns the week day number of the input parameter in local or UTC time. This function is ISO 8601-compliant, meaning that the week days of Monday through Sunday are represented by the values 1 through 7, respectively. The return value is an Integer value.

Examples

X := WeekDayOf(Date);  // X is 1 (Monday, assuming a date of 02/13/2012)
Image