Skip to main content

month

Returns a number representing the month part of a datetime object.

The input object must contain a date. If the object is time-only, the function returns a major warning.

Parameters

Examples

The input value for this example is a string in an automatically recognized datetime pattern.

ATL in Script

Result

[[month('2019-02-06T10:30:15')]]

2

The input value for this example is a datetime object.

ATL in Script

Result

[[
dateTimeString = '06/02/2019T10:30:15';
dateTimeObject = parseDateTime(dateTimeString, "dd/MM/yyyy'T'HH:mm:ss");
month(dateTimeObject)
]]

2

The second line creates a datetime object by applying parseDateTime to a datetime string in a non-recognized pattern. The final line gets the month value from the object.