Parameter
Extracts the ordinal for the second from a date/time object.
An integer in the range 0-59.
Second(date)
|
Parameter |
Description |
|
|
date |
A date/time object |
|
When passing a date/time object as a string, enclose it in quotation marks. Otherwise, it is interpreted as a number representation of a date/time object.
<cfscript>
myDatetime = CreateDateTime(2018,11,18,12,39,22);
writeOutput(myDatetime & "<br/>");
writeOutput("the current second is " & Second(myDatetime));
</cfscript>
Output
{ts '2018-11-18 12:39:22'}
the current second is 22
Sign in to your account