Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Find out local system time zone?

Posted on 2009-06-30
5
Medium Priority
?
319 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
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

824 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