On This Page

Home / Search/ Language Reference/ Functions/ Scalar Functions/ DateTime Functions/monthofyear

monthofyear ​

The monthofyear function returns the integer number representing the month number of the given year.

Syntax ​

monthofyear( Datetime )

Arguments ​

Returns ​

The month number of the given year.

Example ​

This example returns 11:

print monthofyear( datetime("2025-11-30") )