---
title: "timezone function in Strata | Oplema"
description: "Get a timestamp's time zone offset in seconds, or convert a value to a time zone you name. Write it as timezone([zone, ]ts) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/timezone"
updated: "2026-11-04"
---

# 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.

## Try an expression

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

### Expression

```
timezone(INTERVAL '02:00', TIMETZ '12:00:00+00')
```

### Result

```
'14:00:00+02'
```

The expression returns `TIME WITH TIME ZONE`. Formula stores it as `VARCHAR` in this example. 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 | 14:00:00+02 |

## Arguments and types

```
timezone([zone, ]ts)
```

**ts**

Date, Interval, Timestamp, Text

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

[timezone\_hour

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

](https://oplema.com/docs/strata/functions/timezone-hour)[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)[day

Get the day of the month, from 1 to 31, from a date or timestamp.

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

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

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