DayOfWeek

STD.Date.DayOfWeek( date)

dateA date value in the Date_t format.
Return:DayofWeek returns an INTEGER value representing the day of the week, where 1 = Sunday.

The DayOfWeek function returns a number representing the day of the week for the given date. The date must be in the Gregorian calendar after the year 1600.

Example:

IMPORT STD;
D1 := STD.Date.DayOfWeek(STD.Date.Today());
      // D1 contains the day of the week for today's date