SQL
ICU Timestamp with Time Zone Functions
The table below shows the ICU provided scalar functions for `TIMESTAMP WITH TIME ZONE` values.  
| Name | Description |
|:--|:-------|
| [`age(timestamptz, timestamptz)`](#::agetimestamptz-timestamptz) | Subtract arguments, resulting in the time difference between the two timestamps. |
| [`age(timestamptz)`](#::agetimestamptz) | Subtract from current_date. |
| [`date_diff(part, startdate, enddate)`](#::date_diffpart-startdate-enddate) | The number of [partition](#docs:sql:functions:datepart) boundaries between the timestamps. |
| [`date_part([part, ...], timestamptz)`](#date_partpart--timestamptz) | Get the listed [subfields](#docs:sql:functions:datepart) as a `struct`. The list must be constant. |
| [`date_part(part, timestamptz)`](#::date_partpart-timestamptz) | Get [subfield](#docs:sql:functions:datepart) (equivalent to *extract*). |
| [`date_sub(part, startdate, enddate)`](#::date_subpart-startdate-enddate) | The number of complete [partitions](#docs:sql:functions:datepart) between the timestamps. |
| [`date_trunc(part, timestamptz)`](#::date_truncpart-timestamptz) | Truncate to specified [precision](#docs:sql:functions:datepart). |
| [`datediff(part, startdate, enddate)`](#::datediffpart-startdate-enddate) | Alias of date_diff. The number of [partition](#docs:sql:functions:datepart) boundaries between the timestamps. |
| [`datepart([part, ...], timestamptz)`](#datepartpart--timestamptz) | Alias of date_part. Get the listed [subfields](#docs:sql:functions:datepart) as a `struct`. The list must be constant. |
| [`datepart(part, timestamptz)`](#::datepartpart-timestamptz) | Alias of date_part. Get [subfield](#docs:sql:functions:datepart) (equivalent to *extract*). |
| [`datesub(part, startdate, enddate)`](#::datesubpart-startdate-enddate) | Alias of date_sub. The number of complete [partitions](#docs:sql:functions:datepart) between the timestamps. |
| [`datetrunc(part, timestamptz)`](#::datetruncpart-timestamptz) | Alias of date_trunc. Truncate to specified [precision](#docs:sql:functions:datepart). |
| [`epoch_ms(timestamptz)`](#::epoch_mstimestamptz) | Converts a timestamptz to milliseconds since the epoch. |
| [`epoch_ns(timestamptz)`](#::epoch_nstimestamptz) | Converts a timestamptz to nanoseconds since the epoch. |
| [`epoch_us(timestamptz)`](#::epoch_ustimestamptz) | Converts a timestamptz to microseconds since the epoch. |
| [`extract(field FROM timestamptz)`](#::extractfield-from-timestamptz) | Get [subfield](#docs:sql:functions:datepart) from a `TIMESTAMP WITH TIME ZONE`. |
| [`last_day(timestamptz)`](#::last_daytimestamptz) | The last day of the month. |
| [`make_timestamptz(bigint, bigint, bigint, bigint, bigint, double, string)`](#::make_timestamptzbigint-bigint-bigint-bigint-bigint-double-string) | The `TIMESTAMP WITH TIME ZONE` for the given parts and time zone. |
| [`make_timestamptz(bigint, bigint, bigint, bigint, bigint, double)`](#::make_timestamptzbigint-bigint-bigint-bigint-bigint-double) | The `TIMESTAMP WITH TIME ZONE` for the given parts in the current time zone. |
| [`make_timestamptz(microseconds)`](#::make_timestamptzmicroseconds) | The `TIMESTAMP WITH TIME ZONE` for the given µs since the epoch. |
| [`strftime(timestamptz, format)`](#::strftimetimestamptz-format) | Converts a `TIMESTAMP WITH TIME ZONE` value to string according to the [format string](#docs:sql:functions:dateformat::format-specifiers). |
| [`strptime(text, format)`](#::strptimetext-format) | Converts string to `TIMESTAMP WITH TIME ZONE` according to the [format string](#docs:sql:functions:dateformat::format-specifiers) if `%Z` is specified. |
| [`time_bucket(bucket_width, timestamptz[, offset])`](#time_bucketbucket_width-timestamptz-offset) | Truncate `timestamptz` by the specified interval `bucket_width`. Buckets are offset by `offset` interval. |
| [`time_bucket(bucket_width, timestamptz[, origin])`](#time_bucketbucket_width-timestamptz-origin) | Truncate `timestamptz` by the specified interval `bucket_width`. Buckets are aligned relative to `origin` timestamptz. `origin` defaults to 2000-01-03 00:00:00+00 for buckets that don't include a month or year interval, and to 2000-01-01 00:00:00+00 for month and year buckets. |
| [`time_bucket(bucket_width, timestamptz[, timezone])`](#time_bucketbucket_width-timestamptz-timezone) | Truncate `timestamptz` by the specified interval `bucket_width`. Bucket starts and ends are calculated using `timezone`. `timezone` is a varchar and defaults to UTC. |