Day Procedure

Returns the day component of a date.

Overload #1: Day(date)

Declaration
function Day(date as Date) as Number

Parameters

Return value

Number — The day component of the date.

Example

Code
dim x = DateFromParts(2021, 3, 12)
print Day(x)
Output
12

Overload #2: Day(dateTime)

Declaration
function Day(dateTime as DateTime) as Number

Parameters

Return value

Number — The day component of the date.

Example

Code
dim x = DateTimeFromParts(2021, 3, 12, 14, 30, 59, 488)
print Day(x)
Output
12

Overload #3: Day(dateTimeOffset)

Declaration
function Day(dateTimeOffset as DateTimeOffset) as Number

Parameters

Return value

Number — The day component of the date.

Example

Code
dim x = DateTimeOffsetFromParts(2021, 3, 12, 4, 30, 59, 488, Days(-4))
print Day(x)
Output
12