Month

month extracts the month number (1 to 12) from a date.

Syntax

 month(EXP_DATE)

Examples

 # Returns 7Local Integer JULYJULY=month([14/07/1789])# What is the current month?Local Integer CURR_MONTHCURR_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 codeDescription
10The argument is not a date.
56The date is incorrect.

See also

day, year, month$, day$, gdat$, dayn, nday, nday$, date$, datesyst, Date.