Month
month
extracts the month number (1 to 12) from a date.
Syntax
month(EXP_DATE)
EXP_DATE
is an expression returning a date.
Examples
# Returns 7
Local Integer JULY
JULY=month([14/07/1789])
# What is the current month?
Local Integer CURR_MONTH
CURR_MONTH = month(date$)
Description
month
returns the month number from a date. The type of result is Integer.
When the date is a null date ([0/0/0]), the function returns 0.
Associated errors
Error code | Description |
---|---|
10 | The argument is not a date. |
56 | The date is incorrect. |
See also
day, year, month$, day$, gdat$, dayn, nday, nday$, date$, datesyst, Date.