---
title: "timezone_hour function in Strata | Oplema"
description: "Get the hour part of a timestamp's time zone offset. For example, timezone_hour(TIMESTAMP '2024-03-15 12:00:00') returns 0."
url: "https://oplema.com/docs/strata/functions/timezone-hour"
updated: "2026-11-04"
---

# timezone\_hour

Extract the timezone\_hour component from a date or timestamp.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **BIGINT**.

### Expression

```
timezone_hour(TIMESTAMP '2024-03-15 12:00:00')
```

### Result

```
0
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | 0 |

## Arguments and types

```
timezone_hour(ts)
```

**ts**

Date, Interval, Timestamp

Supported signatures (4)

```
timezone_hour(ts: DATE) → BIGINT
timezone_hour(ts: INTERVAL) → BIGINT
timezone_hour(ts: TIMESTAMP WITH TIME ZONE) → BIGINT
timezone_hour(ts: TIMESTAMP) → BIGINT
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[hour

Get the hour, from 0 to 23, from a date or timestamp.

](https://oplema.com/docs/strata/functions/hour)[timezone

With one argument, get the time zone offset of a timestamp in seconds. With two arguments, convert a time or timestamp to a time zone given as a name, or as an interval for a time with time zone.

](https://oplema.com/docs/strata/functions/timezone)[timezone\_minute

Extract the timezone\_minute component from a date or timestamp.

](https://oplema.com/docs/strata/functions/timezone-minute)[century

Get the century from a date or timestamp, such as 20 for 1992.

](https://oplema.com/docs/strata/functions/century)

[Browse dates & times](https://oplema.com/docs/strata/functions#dates-&-times) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/datepart.html#timezone_hourdate)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
