function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ion.ghindaion.ghinda 

How to add Time-Zone in Account ?

Hello,

 

I'm interested in adding a field with the Time Zone to our SF Accounts, so that our support technician could schedule demos and support according to the local time of the customer in question.

 

To my understanding there could be a way to create a field which would infer the time zone automatically based on the postal code of the Account, I don't know to do it though. The basic support told me it's possible to add time zone but it would involve formula and that I should ask for help on this forum.

 

I'd be much greatful if anyone could help me.

 

Thanks in advance!

Ion from Vm6 Software.

Steve :-/Steve :-/

That one could be tricky depending on how many Time-Zones you're dealing with.  Is this global or just North America?

ion.ghindaion.ghinda

It would be global in the long run but for now the vast majority of our accounts are in North America.

Steve :-/Steve :-/

Ouch...  okay that could be tough with a Formula field because that covers a lot of States, Provinces, Zipcodes, etc.  you could be looking at one whopper of a formula.  

ion.ghindaion.ghinda

sorry I didn't intend to get that advanced.. Basically a field for time zone that may recognize North american Time zones by zip/postal code would be super. Whatever doesn't get automatically recognized we could chose from a pick-list.

 

 

ion.ghindaion.ghinda

Any idea how to do this? Even just for USA it would be helpful. Thanks!

Steve :-/Steve :-/

Well, the long way would be to write a Validation Rule or Workflow Rule that evaluates the State/Province or SCF(Zipcode) and returns the appropriate  Time Zone.  You might be able to create a custom object that hold the State-SCF-TimeZone data and reference it using a VLOOKUP.  

But honestly I think the easiest solution would be to just create a custom link to a website like http://www.timeanddate.com/  and pass the City/State into the URL

ion.ghindaion.ghinda

That's a great idea. I created a picklist with the timezones. But how do I create a custom link.. The url field is if somebody can add an url, but I don't know how to insert an url for each account..

 

Thanks so much for your help!

Ion

Steve :-/Steve :-/

Okay, what you want to do is create a custom link on your Account page and do something like the example on pages 4-5 on the Formula User Guide here-> https://na2.salesforce.com/help/doc/en/salesforce_useful_formula_fields.pdf 

 

Steve :-/Steve :-/

Here you go, (and don't say I never gave you anything!)  

 

http://www.time-zone-lookup.info/index.php?search={!Account.BillingCity}%2C+{!Account.BillingState}

 

 

ion.ghindaion.ghinda

So it should be a text formula like:

 

HYPERLINK(

"http://www.timeanddate.com/worldclock/results?p="&BillingCity,

"Timeanddate Worldclock")

 

Because I tried it and it doesn't work.. Can you please tell me what I`m dowing wrong?

 

Thanks!

 

 

Steve :-/Steve :-/

No, just copy & paster the code in my post and you should be good to go.

Scott2014Scott2014
@Steve Molis, I tried to copy and paste what you have and am getting the below error.  Do you have any idea what is incorrect?  

Error:  Enter a URL that is valid and well-formed

I also tried using the the timeanddate.com like below and getting the same error.  

<a href="http://www.timeanddate.com/worldclock/results?p=search={!Account.BillingCity}%2C+{!Account.BillingState}" target="_blank">http://www.timeanddate.com/worldclock/results?p=search={!Account.BillingCity}%2C+{!Account.BillingState}</a>

petec@i2isyspetec@i2isys
I found this and it worked for the account record. It's pretty accurate except it can't deal with the small issues with Oregon and Idaho.  If anyone can figure out how to get OR and ID to work on zip code rather than area code, that would be great!

IF(CASE(BillingState, 'CA', 1, 'NV', 1,'OR', 1, 'WA', 1, 0) >=1, "Pacific", null)+
IF(CASE(BillingState, 'AZ', 1, 'CO', 1,'ID', 1, 'MT', 1, 'NM', 1, 'UT', 1, 'WY', 1, 0) >= 1, "Mountain", null)+
IF(CASE(BillingState, 'AL', 1, 'AR', 1, 'IL', 1, 'IA', 1,'KS', 1, 'LA', 1,'MN', 1,'MS', 1,'MO', 1,'NE', 1,'ND', 1, 'OK', 1,'SD', 1,'WI', 1, 0) >= 1, "Central", null)+
IF(CASE(BillingState, 'CT', 1, 'DE', 1, 'GA', 1, 'ME', 1, 'MD', 1, 'MA', 1,'MI', 1, 'NH', 1, 'NJ', 1, 'NY', 1, 'NC', 1, 'OH', 1, 'PA', 1, 'RI', 1, 'SC', 1, 'VT', 1, 'VA', 1, 'WV', 1, 0) >= 1,"Eastern", null)+
IF(CASE(BillingState, 'AK', 1, 0) >=1, "Alaskan", null)+
IF(CASE(BillingState, 'HI', 1, 0) >=1, "Hawaiian", null)+
IF(BillingState = 'FL', IF(MID(Phone,2,3) = "850","Central","Eastern"),null)+
IF(BillingState = 'IN', IF(MID(Phone,2,3) = "219","Central","Eastern"),null)+
IF(BillingState = 'KY', IF(MID(Phone,2,3) = "270","Central","Eastern"),null)+
IF(BillingState = 'TX', IF(MID(Phone,2,3) = "915","Mountain","Central"),null)+
IF(BillingState = 'TN', IF(CASE(MID(Phone,2,3),"865",1,"423",1,0)>=1,"Eastern", "Central"),null)


petec@i2isyspetec@i2isys
By the way, the orginal formula for the last states had IF(MID(Phone,1,3), but it was not working for me.  I figured of if I changed the 1,3 to 2,3, it worked.
Joshua FeistJoshua Feist
Thanks!
Sarah Miller 16Sarah Miller 16
@petec@i2isys How would you add Canada to this formula?