HOUR

Purpose

This function returns the hours of a timestamp.

Syntax

hour::=

Usage Notes

  • This function can also be applied on strings, in contrast to function EXTRACT.
  • For data type TIMESTAMP WITH LOCAL TIME ZONE this function is calculated within the session time zone.

Example

SELECT HOUR(TIMESTAMP '2010-10-20 11:59:40.123');