Extract the number of the month from a date.
XSharp.RT (in XSharp.RT.dll) Version: 2.5
dDate AS DATE
) AS DWORD
public static uint Month(
- Type: Date
A number from 0 to 12. Specifying a NULL_DATE returns 0.
Month() is a date conversion function that is useful when you require a numeric month value during calculations for such things as periodic reports.
Month() is a member of a group of functions that return components of a date value as numbers.
The group includes Day() and Year() to return the day and year values as numerics. CMonth() is a related function that allows you to return the name of the month from a date value.
These examples return the month of the system date:
4? Month(Today()) + 1
This example uses month along with Day() and Year():
1?"We are", Year(Today()), "years, ",;
2 Month(Today()), "months, and", Day(Today()),;
3 "days into our history!"
This example shows the result when a NULL_DATE is passed: