Loading

How to Convert a Date Time Field to Another Time Zone Accounting for Daylight Savings

Udgivelsesdato: Apr 1, 2026
Opgave
How to convert a date time field to another time zone accounting for daylight savings. For example:
  • Arizona uses MT but does not use daylight savings
  • Washington uses PDT starting March 12 and ending November 5
  • Therefore, between March 12 and November 5, there is no time difference between Washington and Arizona, but the rest of the year Arizona is one hour ahead.
Trin
Create a calculation that conditionally adds a different number of hours based on what the date is. Based on the above example, the following formula could be used:
IF [Date Field] >= DATE( "3/12/" + YEAR( [Date Field] ) )
AND TODAY < DATE( "11/5/" + YEAR( [Date Field] ) )
THEN [Date Field]
ELSE DATEADD( 'hour', 1, [Date Field] )
END

 

Yderligere ressourcer
Dates and Times
 
Vidensartikelnummer

001458064

 
Indlæser
Salesforce Help | Article