Macromedia coldfusion 4.5-cfml language reference User Manual

Page of 608
Chapter 2:  ColdFusion Functions
373
Hour
Returns the ordinal value for the hour, ranging from 0 to 23.
See also 
DatePart
Minute
, and 
Second
.
Syntax
Hour(
date)
date
Any date.
Usage
Years from 0 to 29 are interpreted as 21
st
 century values. Years 30 to 99 are interpreted 
as 20
th
 century values.
When passing a date/time value as a string, make sure it is enclosed in quotes. 
Otherwise, it is interpreted as a number representation of a date/time object, returning 
undesired results.
Examples
<!--- This example shows the use of Hour, Minute, and Second --->
<HTML>
<HEAD>
<TITLE>
Hour Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>Hour Example</H3>
<CFOUTPUT>
The time is currently #TimeFormat(Now())#.
We are in hour #Hour(Now())#, Minute #Minute(Now())#
and Second #Second(Now())# of the day.
</CFOUTPUT>
</BODY>
</HTML>