MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Microsoft Access

Microsoft Access Questions about Access.

Reply
 
Thread Tools Display Modes
Old Nov 4th, 2009, 12:05 AM   #1
jackd
 
Join Date: Oct 2006
Location: Ottawa, Canada
Posts: 379
Default Re: Standardize Time Zone for Now()

Quote:
Originally Posted by dk View Post
I did do a bit more research into this and still couldn't find a really clean way of getting the NY time from anywhere in the world. Here are a few options that I can think of:

1. Always use EST. This is the easiest way and your code will be robust. If you need to report on when records were added then you can use a function to convert from EST to the NY time (probably using a table that shows daylight savings start and end points for each year). Maybe if you can explain what you're using the time stamp field for we could determine if this is a workable solution.

2. Look in the registry and determine what the time is in New York. If you look in the registry under HKLM/SOFTWARE/Microsoft/Windows NT/Current Version/Time Zones you can see that there is a folder for each time zone available within the regional settings in Windows. You could probably read the time for any zone by reading the appropriate time zone (looks like it's under the Eastern Standard Time folder in Windows XP at least). This option might work quite nicely.

I think option 1 is more robust, option 2 would involve some reasonably advanced code. What are your thoughts on 1?

DK
Hi Guys,

I also did a bit of looking but could not find anything better than your option1.

The only other thing I would add is that -
if it were possible to get to a "time site" that provided the current time in New York
and return that value all while working within your application - then that might be a solution.

I have not seen anything robust nor easy to understand re calling a webservice from MSAccess.

Re your comment in #1 "Maybe if you can explain what you're using the time stamp field for we could determine if this is a workable solution." may shed more light on possible solutions.

The functions we have can tell what time zone pjhofer83 is in -- that is EST or EDT provided he gets regular updates via Internet. (This is done automatically if your computer is attached to internet- as best I can discover.)

jack
jackd is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 11:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.