Skip to content

Instantly share code, notes, and snippets.

Created February 10, 2016 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3114ab628994d6d8d6df to your computer and use it in GitHub Desktop.
Save anonymous/3114ab628994d6d8d6df to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
startTime = Now();
sleep(3688);
endTime = Now();
</cfscript>
<cfoutput>
start: #TimeFormat(startTime, 'HH:mm:ss L')#<br />
end: #TimeFormat(endTime, 'HH:mm:ss L')#<br />
<br />
Duration: #dateDiff("s", startTime, endTime)# seconds<br />
Duration: #dateDiff("n", startTime, endTime)# millseconds<br /><br />
<!--- invalid call of the function dateDiff, third Argument (datePart) is invalid, invalid value [l], valid values has to be [q,s,n,h,d,m,y,yyyy,w,ww] --->
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment