Skip to main content

day

Returns a number representing the day 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

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

6

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");
day(dateTimeObject)
]]

6

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