Different time zones across different servers can be confusing. For example, most of the SFMC (ExactTarget) servers are in the Central Time Zone. Also if you’re bringing over data through the Marketing Cloud Connector, the date/time from Sales/Service/Health Cloud are all in the UTC time zone.
You may have tried using CONVERT or DATEADD in SQL to update the times to match, but with different regions with daylight savings time and others not recognizing daylight savings, the time and dates can get screwy during certain months of the year.
Use Case:
You have appointment data in Service Cloud in UTC, but your hospitals are located only on the East Coast of the United States. When you bring over data through the Marketing Cloud Connector, you want to always show that data in Eastern Standard Time.
Solution:
The solution is to use AT TIME ZONE which can consistently and accurately convert your time to a specified local time zone no matter what time of the year and whether or not the local time zone is experiencing daylight saving time. Here’s the syntax:
Syntax:
SELECT inputdate AT TIME ZONE ‘Name of destination time zone’;
Example:
SELECT appointmentTime AT TIME ZONE ‘Eastern Standard Time’ as appointmentTime_EST
The AT TIME ZONE SQL function consistently converts the time from UTC to EST in the example above. Any of the supported timezones below can be used in place of ‘Name of destination time zone’ shown in the syntax above.
| Name of Destination Time Zone | Current UTC Offset |
| UTC-11 | -11:00 |
| Hawaiian Standard Time | -10:00 |
| UTC-09 | -09:00 |
| Alaskan Standard Time | -08:00 |
| UTC-08 | -08:00 |
| Pacific Standard Time | -07:00 |
| Mountain Standard Time | -06:00 |
| Central Standard Time | -05:00 |
| Eastern Standard Time | -04:00 |
| Argentina Standard Time | -03:00 |
| Greenland Standard Time | -02:00 |
| UTC-02 | -02:00 |
| Mid-Atlantic Standard Time | -01:00 |
| UTC | +00:00 |
| GMT Standard Time | +01:00 |
| Central Europe Standard Time | +02:00 |
| Middle East Standard Time | +03:00 |
| Caucasus Standard Time | +04:00 |
| Pakistan Standard Time | +05:00 |
| India Standard Time | +05:30 |
| Central Asia Standard Time | +06:00 |
| North Asia Standard Time | +07:00 |
| Taipei Standard Time | +08:00 |
| Tokyo Standard Time | +09:00 |
| West Pacific Standard Time | +10:00 |
| Central Pacific Standard Time | +11:00 |
| UTC+12 | +12:00 |
| UTC+13 | +13:00 |