Extract the number of the day of the week from a date.
XSharp.RT (in XSharp.RT.dll) Version: 2.16
Syntax Request Example
dDate AS DATE
) AS DWORD
public static uint DoW(
- Type: Date
The day of the week as a number from 1 to 7, where 1 is Sunday, 2 is Monday, and so on.
For an invalid or NULL_DATE, DoW() returns 0.
DoW() is a date conversion function that converts a date value to a number identifying the day of the week.
It is useful when you want date calculations on a weekly basis. DoW() is similar to CDoW(), which returns the day of week as a string instead of a number.
These examples illustrate CDoW() and its relationship to DoW():
4? DOW(TODAY() - 2)
5? CDOW(TODAY() – 2)