Solved

Find out local system time zone?

Posted on 2009-06-30
5
262 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
  • 3
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Chuck Wood
Comment Utility
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
Comment Utility
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
Comment Utility
You place it in a separate module.
0
 
LVL 1

Author Comment

by:wsturdev
Comment Utility
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 500 total points
Comment Utility
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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now