Unix Time Conversion Problem...

C

CDF

I have a query that uses the DateAdd() function to covert a Unix time
to regular time. The only problem- the time is off by 6 hours (it
displays 6 hours ahead of what it should be). I think this has
something to do with the time zones (I am CST), but I am not sure what
will fix the problem. Does anyone know what I can do to fix my
situation? Is there a code or function that will do this or is it
something with the time set on the computer. What about Access? Is
there something with the application that I have to change? Any help
is appreciated! -Corey
 
D

Douglas J. Steele

There's nothing built into Access to handle it, but it's pretty easy to do
it yourself.

Take a look at http://vbnet.mvps.org/code/locale/gettimezonebias.htm at
Randy Birch's site for code to determine your time zone offset. (Note: You
often have to be careful with code from Randy's site, because it's aimed at
VB programmers, not Access programmers, so the Form-related instructions
sometimes won't work in Access. This particular sample looks as though it
should port with no problems, though). Once you know the offset, use DateAdd
to adjust the time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top