ConvertTimezone

The ConvertTimezone function converts datetime values to the specified time zone.

Syntax

ConvertTimezone(date, timezone, [from_timezone])

Function arguments:

date(required) The datetime value to convert.
timezone(required) The TZ identifier of the IANA time zone to which the datetime value is converted. See List of TZ database time zones for reference.
from_timezone

(optional) The TZ identifier of the IANA time zone from which the datetime value is converted.

Defaults to the organization account time zone when the argument is unspecified.

Notes

  • The timezone and from_timezone arguments support a column of IANA time zones as text to perform dynamic time zone conversion.
  • ConvertTimezone shifts the input datetime by the offset difference between the from_timezone and timezone. Because all date values in Sigma are represented in the organization account time zone, the result is not necessarily being displayed in the timezone specified in the timezone argument.

Examples

ConvertTimezone([Date], "America/Los_Angeles")

Interprets values in the Date column as datetime values in the organization account time zone, then converts them to the equivalent datetime values in America/Los_Angeles (Pacific) time.

ConvertTimezone(Date("2014-07-18 10:58:00"), "America/Los_Angeles", "America/New_York")

Interprets 2014-07-18 10:58:00 in America/New_York (Eastern) time and converts it to 2014-07-18 07:58:00, the corresponding time in the America/Los_Angeles (Pacific) time zone.

ConvertTimezone(Date([Date]), [Time zone], [From time zone])

Converts the text "2025-01-01 00:00:00" in the [Date] column to a date, then converts it from the time zone specified in [From time zone] to the time zone specified in [Time zone].

A table with four columns - date, time zone, from time zone, and conversion shows the date 2025-01-01 converted dynamically from and to several different time zones.