TIMEZONE_HOUR is a datetime field identifier defined by the SQL standard. It is not a standalone function; instead, it is supplied to the EXTRACT (or equivalent) function to obtain the signed hour component of a timestamp's UTC offset. For example, a timestamp with time zone '+05:30' has a TIMEZONE_HOUR of 5, while '-08:00' has ‑8.Returned type is an integer in the range ‑14 to +14, matching the valid global time-zone offset hours. When the underlying value has no time-zone information (plain TIMESTAMP), the result is implementation-dependent or NULL, so always use a time-zone-aware datatype. Negative offsets include the sign (e.g., -8).Supported expressions:- EXTRACT(TIMEZONE_HOUR FROM )- DATE_PART('timezone_hour', ) in PostgreSQLBecause TIMEZONE_HOUR is part of the SQL:1999 standard, most modern databases expose it, though syntax can vary.
EXTRACT, TIMEZONE_MINUTE, DATE_PART, TIMESTAMP WITH TIME ZONE, INTERVAL
SQL:1999
It is a datetime field identifier used with EXTRACT to obtain the signed hour component of a timestamp's UTC offset.
No. TIMEZONE_HOUR is not a standalone function. Supply it to EXTRACT or DATE_PART depending on the database.
Values range from -14 to +14, matching the extreme legal time-zone offsets worldwide.
TIMEZONE_HOUR gives the hour part of the offset, while TIMEZONE_MINUTE returns the minute part (0 or 30/45 in most zones).