Using MS Access/getting a GMT/UTC time

Advertisement


Question
Hello,

  I have a table with few datetime fields. Those fields are filled in different situations and sometimes in different localizations.

Is there a way to get values of those fields in a common GMT/UTC timezone?

For now I am loosing few hours calculating difference between those fields.

To be more precize those fields are always filled with the now() function, maybe then I have to get the now() value as a universal time somehow ?

Regards,
Tomasz.

Answer
The Now function picks up the system time that you PC is set for. No way to change that.

You should be able to use the DateDiff function to add or subtract the difference between your local time and whatever time zone you want. The only other thing I can think of would be to see if you could pull time for a specific zone using something like worldtime.com.

HTH
Scott<>

Using MS Access

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scottgem

Expertise

I can answer almost all types of questions relating to Microsoft Access usage and application design. My strengths are database and interface design.

Experience

I've been designing databases for over 15 years working with dBase, FoxPro, Approach and Access.

Organizations
Author of Microsoft Office Access 2007 VBA
Techncial Editor for Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports & Queries From Que Publishing

©2012 About.com, a part of The New York Times Company. All rights reserved.