Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / August 2005

Tip: Looking for answers? Try searching our database.

Identify Time Zone

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bernie - 04 Aug 2005 19:46 GMT
Is it possible to:
1.  Upon entering a field value of date/time to register the time zone?
2.  Display the time values that are recorded in the user's time zone?  I
have a user table so I could assign time zones to each user.

Bernie
Klatuu - 04 Aug 2005 21:36 GMT
You could have an additional field called [TIME_ZONE]. It would have to be
entered by the user.
What I don't know is what time zone you are in, whether you are looking at
only US time zones, or global time zones, etc.  If you are using only US time
zones, I would store all times in EST(Not Daylight Savings, we'll get to
that) then for the values in [TIME_ZONE] I would use:
EST = 0
CST = 1
MST = 2
PST = 3

Then, to display the user's time in his local time:
=DateAdd("h",-rst![TIME_ZONE],rst![THE_TIME])
Now, as to Daylight Savings,  When it is in effect, you would need to add
this:
=DateAdd("h",-rst![TIME_ZONE]+1,rst![THE_TIME])
Here it gets sticky. There is probably a way to query the system time and
determine if it is on DST or not, but I don't know how.  The other problem
is, that not all places in the US go on DST, Arizona, for example, ignores it.
(That is why it is a desert, the extra hour of sunlight burns up all the
vegetation)
And, there might be a 3rd party product that will know what the correct time
is for a location.

> Is it possible to:
> 1.  Upon entering a field value of date/time to register the time zone?
> 2.  Display the time values that are recorded in the user's time zone?  I
> have a user table so I could assign time zones to each user.
>
> Bernie
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.