Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timezone challenge

Status
Not open for further replies.

jedel

Programmer
Jan 11, 2003
430
AU
High All

He is a challenge for those of you who would like to give it a whirl.

I would like to place an unbound form on my database that shows the time from several different timezones around the world, with all of the times working.

Any ideas?

-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
How are ya jedel . . .

A textbox for each zone run from the forms timer!

Calvin.gif
See Ya! . . . . . .
 
As AceMan says, seems pretty simple. Place one textbox for each timezone. On the Timer event (which would fire every second), update each textbox with the current time, plus or minus whatever the timezone difference is.


 
Sorry, for some reason I was thinking 'form on an asp page'. I don't know if Dynamic Drive has any Access form tools. To use the timer event in an access form, you would create an event procedure in the Form_Timer event with something like

Me.txtTime1 = Now()
or
Me.txtTime1 = Format(Now(),"hh:mm:ss")

and then set the Timer Interval to 1000. If you set it below 1000, which I think is a second, you will see more flicker in the textbox.

Paul
 
Thanks guys for your input. I know how to get the time from my PC onto an access form. The trick comes when I want to place the times from other timezones on there also.

For example, I live on the East Coast of AUS which is GMT +10.
My father lives on the west coast (GMT +8)

If he were to use this database over there, I would need to make sure that all of the times are correct. Therefore calculating the other timezones from the time off your PC becomes a little tricky

Thoughts?

-------------------------------------------------------------
"The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
 
You may consider the following function:
Code:
Public Function myTimeOffset(intHourOffset As Integer) As Date
myTimeOffset = Time + (intHourOffset / 24)
End Function

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top