Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Find out local system time zone?

Posted on 2009-06-30
5
Medium Priority
?
316 Views
Last Modified: 2013-11-27
In Access 2007, how can I find out the time zone being used by the local system, or better yet, the offset from the current local time zone to GMT?
0
Comment
Question by:wsturdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Chuck Wood
ID: 24746952
I think this will meet your needs:

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_20877498.html?sfQueryTermInfo=1+time+vba+zone 

If not,  unzip the attached file, change the extension to .bas, and use the functions in this module.
modTimeZones.zip
0
 
LVL 1

Author Comment

by:wsturdev
ID: 24747108
I looked at the link.  I have never seen such a construct before.  Where do I place it?
0
 
LVL 16

Expert Comment

by:Chuck Wood
ID: 24747225
You place it in a separate module.
0
 
LVL 1

Author Comment

by:wsturdev
ID: 24747242
I figured out where to place it.  It gives me the name of my time zone ("Eastern Standard Time").  What I would rather have is "EST" and the offset to GMT (-5).  How can I get that?
regarding the modTimeZones.zip, I unzipped it and changed the extension, but now what do I do with it to get at the functions?
0
 
LVL 16

Accepted Solution

by:
Chuck Wood earned 2000 total points
ID: 24747290
To get "EST" and other abbreviations, you would need to create a function that converts the full name to the abbreviation.

To get the offset, you should import the module into your database (Visual Basic window => File => Import File => navigate to the file => select the file => Open. You can then use the LocalOffsetFromGMT function.
0

Featured Post

How Blockchain Is Impacting Every Industry

Blockchain expert Alex Tapscott talks to Acronis VP Frank Jablonski about this revolutionary technology and how it's making inroads into other industries and facets of everyday life.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question