How to get the current hour of the day in ColdFusion

Hour() - get the current hour of the day

Hour.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Hour function example: how to get the current hour of the day</title>
</head>

<body>
<h2 style="color:hotpink">Hour Function Example</h2>

<cfoutput>
<b>
Now: #Now()#
<br />
Current Hour: #Hour(Now())#
</b>
</cfoutput>
</body>
</html>






More ColdFusion examples