Hour function

Official Content
This documentation is valid for:

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

Syntax

Hour(DateTime-expression)

Type Returned:
Numeric

Scope

Objects: Procedure, Transaction, Web Panel
Generators: .NET, Ruby (up to GeneXus X Evolution 3), Java, RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol

Description

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

Samples

Supose 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

See Also

TimeZone Support - General Considerations
Hour method
Minute function
Second function