Skip to content

Instantly share code, notes, and snippets.

@bdunagan
Created December 29, 2016 04:34
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bdunagan/38f27d4eaa869a61699d733e712e264b to your computer and use it in GitHub Desktop.
Salesforce: How to Set Up US Timezones with a Custom Formula
# Salesforce Custom Formula for US Timezones based on Billing State
# Note there are 51 because DC counts.
CASE(BillingState,
"HI","US-PST",
"AK","US-PST",
"WA","US-PST",
"OR","US-PST",
"CA","US-PST",
"NV","US-PST",
"MT","US-MST",
"WY","US-MST",
"ID","US-MST",
"UT","US-MST",
"CO","US-MST",
"NM","US-MST",
"AZ","US-MST",
"ND","US-CST",
"MN","US-CST",
"WI","US-CST",
"SD","US-CST",
"IA","US-CST",
"IL","US-CST",
"KY","US-CST",
"TN","US-CST",
"AL","US-CST",
"MS","US-CST",
"AR","US-CST",
"MO","US-CST",
"LA","US-CST",
"TX","US-CST",
"OK","US-CST",
"KS","US-CST",
"NE","US-CST",
"MI","US-EST",
"OH","US-EST",
"IN","US-EST",
"GA","US-EST",
"FL","US-EST",
"SC","US-EST",
"NC","US-EST",
"VA","US-EST",
"WV","US-EST",
"PA","US-EST",
"DC","US-EST",
"MD","US-EST",
"DE","US-EST",
"NJ","US-EST",
"NY","US-EST",
"VT","US-EST",
"ME","US-EST",
"NH","US-EST",
"RI","US-EST",
"CT","US-EST",
"MA","US-EST",
"-")
@contego91
Copy link

What about states that have multiple time zones? Florida for example is in both Eastern and Central time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment