DoW Function | |
Extract the number of the day of the week from a date.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax FUNCTION DoW(
dDate AS DATE
) AS DWORD
public static uint DoW(
Date dDate
)
Request Example
View SourceParameters
- dDate
- Type: Date
The date.
Return Value
Type:
DWord
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.
Remarks
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.
Examples
These examples illustrate CDoW() and its relationship to DoW():
1? TODAY()
2? DOW(TODAY())
3? CDOW(TODAY())
4? DOW(TODAY() - 2)
5? CDOW(TODAY() – 2)
See Also