Different time zone for Access than OS

  • Thread starter Thread starter Carlos
  • Start date Start date
C

Carlos

I have a clock on a form using a label and the timer
function.
Timer at 1000
label.caption = Format(Time,"hh:nn:ss")
However I want the clock to display the time in GMT (UTC)
while leaving the Windows regional setting to local time
(EST). How can I do this?

Thank you,

Carlos
 
I don't know if you can do it directly, but you could try setting a
field somewhere with your GMT offset, and then doing a lookup for that
value when the field is opened. Then you could use DateAdd to modify it
using your offset. Something like:

Dim intOffset as Integer

intOffset = DLookup ("Offset", "tblSettings", "SettingsID = 1")

Timer at 1000
label.caption = Format(Time,"hh:mm:ss")
label.caption = DateAdd("h", intOffset, label.caption)

or something like that. I'm not actually sure it would work exactly this
way, but it's a direction...
 
Back
Top