Extract the number of the day of the month from a date.
XSharp.RT (in XSharp.RT.dll) Version: 2.16
Syntax Request Example
dDate AS DATE
) AS DWORD
public static uint Day(
- Type: Date
The day of the month, as a number in the range 0 to 31.
If the day is February 29 and the year is not a leap year, Day() returns 0.
For an invalid or NULL_DATE, Day() returns 0.
Day() is a date conversion function that is useful when you require a numeric day value during calculations for such things as periodic reports.
Day() is a member of a group of functions that return components of a date value as numbers.
The group includes Month() and Year() to return the month and year values as numerics.
CDoW() is a related function that allows you to return the name of the day from a date value.
These examples show the Day() function used several ways:
3? Day(Today()) + 1
This example uses Day() in combination with CMonth() and Year() to format a date value:
1? CMonth(Today()) + Str(Day(Today())) + ;
2 "," + Str(Year(Today()))