Official Content

Returns the numeric month identifier of a given date. A null value (0) is returned if the received parameter is null.

Syntax

Date | DateTime.Month()

Where:

Date | DateTime
     
Is an attribute or variable based on the Date/DateTime data type, to which the method will find its numeric month identifier.

Type returned:
Numeric N(2)

Scope

Data Types: Date, DateTime

Samples

&MonthNumber= &GivenDate.Month() // if &GivenDate = 07/11/2022, the result of &MonthNumber is: 7

See Also

TimeZone Support - General Considerations
Month function
Year method
Day method







Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant