JavaScript Editor js editor     Web development 



Main Page

Returns the number of the month for a given Date or DateTime expression.

MONTH(dExpression | tExpression)

Parameters

dExpression


Specifies the Date expression for which you want MONTH(В ) to return the month number.
tExpression


Specifies the DateTime expression for which you want MONTH(В ) to return the month number.

Return Value

Numeric

Remarks

MONTH(В ) returns a number from 1 through 12. January is month 1, and December is month 12.

Example

В Copy Code
CLEAR
? DATE( )  && Displays today's date
? MONTH(DATE( ))  && Displays the month number
STORE {^1998-05-03} TO gdBuy
STORE MONTH(gdBuy + 31) TO gdMonth
? gdMonth  && Displays 6

See Also



JavaScript Editor js editor     Web development