Returns the hour portion from a DateTime expression.
HOUR(tExpression) |
Parameters
- tExpression
- Specifies a DateTime expression from which HOUR(В ) returns the hour.
Return Value
Numeric
Remarks
HOUR(В ) returns a numeric value based on a 24 hour format, and is not affected by the current setting of SET HOURS. For example, if SET HOURS is 12 or 24, the following command returns 13:
В | Copy Code |
---|---|
? HOUR({^1998-02-16 1:00p}) |
Example
The following example displays the hour portion of the current time and the hour portion of a specific time.
В | Copy Code |
---|---|
CLEAR ? HOUR(DATETIME( )) ? HOUR({^1998-02-16 10:42a}) && Displays 10 |