Skip to main content Skip to complementary content

month - script and chart function

This function returns a dual value: a month name as defined in the environment variable MonthNames and an integer between 1-12. The month is calculated from the date interpretation of the expression, according to the standard number interpretation.

The function returns the name of the month in the format of the MonthName system variable for a particular date. It is commonly used to create a day field as a dimension in a Master Calendar.

Syntax:  

month(expression)

Return data type: integer

Function examples
Example Result

month( 2012-10-12 )

returns Oct
month( 35648 ) returns Aug, because 35648 = 1997-08-06

Example 1 – DateFormat dataset (script)

Example 2 – ANSI dates (script)

Example 3 – Unformatted dates (script)

Example 4 – Calculating expiry month

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!