How do I add timezones to my Datetime values?

  • Updated

SQL logs timestamps in two formats: timestamp and timestamptz. timestamp refers to timestamp without timezone, whereas timestamptz refers to timestamp with timezone. Benchling warehouse stores datetime data in UTC timezone.

Therefore, if you’d like to show timezones in your query, cast your timestamp value to timestamptz before converting to your desired timezone as shown below:

timezone('US/Pacific', created_at.datetime::timestamptz) as "Created Time"
FROM org.registry_entity$raw
Additional resource

List of available timezones:
More details on using timezones:

Was this article helpful?

Have more questions? Submit a request