ConvertTimezone
Converts datetime values to a specified time zone.
Category: date
Syntax:
ConvertTimezone([date], "timezone", |from_timezone|)
Returns: DateTimeColumn
Context Filtering: ✓ Yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date |
column\|datetime |
✓ Yes | The datetime value to convert. |
timezone |
text |
✓ Yes | The TZ identifier of the IANA time zone to which the datetime value is converted. |
from_timezone |
text |
✗ No | Optional TZ identifier of the IANA time zone from which the datetime value is converted. Defaults to the organization account time zone when unspecified. |
Allowed Column Types: DATETIME
Validation
- Minimum parameters: 2
- Maximum parameters: 3
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 the equivalent time in America/Los_Angeles (Pacific).
Result: 2014-07-18 07:58:00