Official Content

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

Syntax

Hour(DateTime-expression)

Type Returned:
Numeric

Scope

Objects: Procedure, Transaction, Web Panel, Panel, Data Provider
Generators: .NET, .NET FrameworkJava, Ruby (up to GeneXus X Evolution 3), RPG, Visual FoxPro (up to GeneXus X Evolution 3), Cobol, Apple, Android, Angular

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


Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant