You are viewing content for 5.1 | 5.0 | 4.9 | 4.8 | 4.7 | 4.6 | 4.5 | 4.4 | 4.3 | Previous Releases


hour

Returns the hour field of a date/timestamp.

Example

Extract the hour field from December 24, 2001 11:55:12.000.

hour(timestamp("2001-12-24 23:55:12.000"))

This example produces 23.

Syntax

hour(timestamp expr t)
  • t : expression evaluating to timestamp

    Returns

    int

Notes

hour takes a timestamp value and returns the hour field from it as an int.


© Incorta, Inc. All Rights Reserved.