Second Procedure

Returns the second component of a time.

Overload #1: Second(dateTime)

Declaration
function Second(dateTime as DateTime) as Number

Parameters

Return value

Number — The second component of the time.

Example

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

Overload #2: Second(dateTimeOffset)

Declaration
function Second(dateTimeOffset as DateTimeOffset) as Number

Parameters

Return value

Number — The second component of the time.

Example

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