Calculate Time in timezones

  • Thread starter Thread starter dick hob
  • Start date Start date
D

dick hob

I would like to display the time in all US time zones
(EST, CST, MST, PST). Adding/subtracting from TIME() does
not work. I'm sure this is simple, but I can't find the
correct sysntax.
Thanks
Dick
 
Dick,
Add 4 unbound labels to your form.

I'm in the West coast so I'll start with PST and add an hour
for each other Zone.
You can also start with EST and subtract an hour for each zone.

Set the Form's Timer Interval to
1000

Code the Form's Timer event:
LabelPacific.Caption = Time
LabelMountain.Caption = DateAdd("h",1,Time)
LabelCentral.Caption = DateAdd("h",2,Time)
LabelEastern.Caption = DateAdd("h",3,Time)

To subtract time, if you are on the East Coast, use
DateAdd("h",-1,Time) for the Central Time Zone, etc.
 
Back
Top