Solved

Find out local system time zone?

Posted on 2009-06-30
5
303 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 500 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Fields don't match on a query 9 47
usage of ms/excell 3d maps in ms/access 2016 6 43
Excel graph in access report 1 34
Multiple tables for a tabbed form 2 33
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

752 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