Hour Function

Official Content
This documentation is valid for:

To return a numeric value representing the time in 24-hour format.

Syntax

Hour(datetime-expression)

Type Returned:
Numeric

Description

Returns a numeric value representing the time, in 24-hour format, given a datetime argument.

Example

You only want to obtain the hour part of a datetime variable or attribute.

&Hour = Hour(Now())
// Now = 11/24/2010 02:32 PM
// &Hour = 14

Scope

Objects: Procedures, Transactions, Web Panels
Languages: .NET, Ruby (up to GeneXus X Evolution 3), Java, RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol

See Also

TimeZone Support - General Considerations
Hour Method
Minute Function
Second Function




Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.