second

Extracts the ordinal for the second from a date/time object.

second(date) → returns Numeric

Member Function Syntax

date.second()

Argument Reference for the second function

date

Required: Yes
A date/time object Values:
  • now()

Compatibility

ColdFusion:

Member function is available in CF 11+.

Lucee:

Member function is available in Lucee 4.5+.

Examples sample code invoking the second function


Seconds of a datatime object

dt = createdatetime(2016,1,1,5,30,25);
s = second( dt );
writeoutput( s );

Expected Result: 25


Fork me on GitHub