SQL Keywords

SQL TIMEZONE_MINUTE

What is SQL TIMEZONE_MINUTE?

TIMEZONE_MINUTE returns the minute portion of the time-zone offset from a TIMESTAMP WITH TIME ZONE value when used with EXTRACT.
Sign up to get up to date news on SQL keywords
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Compatible dialects for SQL TIMEZONE_MINUTE: PostgreSQL, Oracle, IBM Db2, Snowflake, Google BigQuery, DuckDB, ISO/IEC SQL compliant engines. Not supported in MySQL or SQLite. SQL Server uses DATEPART(tzminute, expression) instead.

SQL TIMEZONE_MINUTE Full Explanation

TIMEZONE_MINUTE is one of the date-time fields defined by the ANSI/ISO SQL standard for use with the EXTRACT function. When you pass a TIMESTAMP WITH TIME ZONE (or its dialect-specific equivalent) to EXTRACT and specify TIMEZONE_MINUTE, the function returns an integer between 0 and 59 representing the minutes component of the value’s time-zone offset. Positive values indicate offsets east of UTC, negative values offsets west of UTC. The field is read directly from the literal or column value, so the result does not depend on the session’s current time zone or daylight-saving rules. TIMEZONE_MINUTE is often paired with TIMEZONE_HOUR to reconstruct the full offset in minutes.

SQL TIMEZONE_MINUTE Syntax

SELECT EXTRACT(TIMEZONE_MINUTE FROM <timestamp_with_time_zone_expression>);

SQL TIMEZONE_MINUTE Parameters

Example Queries Using SQL TIMEZONE_MINUTE

-- Returns 30 because the literal has an offset of -05:30
SELECT EXTRACT(TIMEZONE_MINUTE FROM TIMESTAMP '2023-01-01 10:00:00-05:30');

-- Extract from a column
SELECT id,
       EXTRACT(TIMEZONE_MINUTE FROM event_time) AS tz_minute
FROM   events;

-- Calculate total offset in minutes (hour * 60 + minute)
SELECT EXTRACT(TIMEZONE_HOUR   FROM event_time) * 60 +
       EXTRACT(TIMEZONE_MINUTE FROM event_time)       AS offset_minutes
FROM   events;

Expected Output Using SQL TIMEZONE_MINUTE

  • Each query returns an INTEGER
  • In the first example the output is 30
  • In the second, every row gets the minute portion of its stored offset
  • In the third, you obtain the full offset in minutes (e
  • g
  • , -330 for -05:30)

Use Cases with SQL TIMEZONE_MINUTE

  • Display or store the exact time-zone offset for auditing and replication
  • Normalize timestamps to UTC by computing total offset minutes
  • Build reporting columns showing offset details for user events
  • Validate that incoming data carries the expected regional offset

Common Mistakes with SQL TIMEZONE_MINUTE

  • Using TIMEZONE_MINUTE with plain TIMESTAMP values (no offset). This yields NULL or an error.
  • Expecting TIMEZONE_MINUTE to honor session time-zone changes; it only reflects the stored offset.
  • Forgetting that the result is always non-negative minutes even for negative offsets (hour carries the sign).
  • Mixing up DATEPART equivalents in SQL Server (tz or tzminute) with standard TIMEZONE_MINUTE.

Related Topics

EXTRACT, TIMEZONE_HOUR, TIMEZONE, TIMESTAMP WITH TIME ZONE, DATEPART

First Introduced In

SQL:1999

Frequently Asked Questions

What does TIMEZONE_MINUTE return?

It returns the minute component (0-59) of a TIMESTAMP WITH TIME ZONE value’s stored offset.

When should I use TIMEZONE_MINUTE instead of TIMEZONE?

Use it when you need only the minute part or want to rebuild the full offset with TIMEZONE_HOUR.

Does TIMEZONE_MINUTE account for daylight-saving time?

It simply reports the offset stored in the value, so daylight saving is only reflected if the timestamp was recorded during DST.

Why does TIMEZONE_MINUTE give 0 for UTC timestamps?

UTC offsets are +00:00, so the minute portion is always 0.

Sign up to get up to date news on SQL keywords
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.
Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo

Check out other commonly used SQL Keywords!