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

monthofyear(datetime("2022-10-14")) returns as 10.