Calculate Time in timezones

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
 
F

Fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top