Hour

Description

Returns the ordinal value for the hour, in the range 0 - 23.

Category

Date and time functions

Syntax


Hour(date) 

See also

DatePart, Minute, Second

Parameters

Parameter
Description
date
A date

Usage

Year values 0-29 are interpreted as 21st century dates. Year values 30-99 are interpreted as 20th century dates.

When passing a date/time value as a string, enclose it in quotes. Otherwise, it is interpreted as a number representation of a date/time object.

Example

<!--- 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> 



Banner.Novgorod.Ru