How do I convert data into another time zone?

R

Rudy

I am importing data into Access based on a calling
center. The data is represented in CST (Central Standard
Time). Is there a way I can have the data represented in
another time zone?

I appreciate your response.
 
K

Ken Snell

Not sure what you are seeking, but you could use the DateAdd function to
add/subtract hours from a value in order to display it in another "time
zone" value?
 
R

Rudy

Ken,

Thanks for your insight. To be more specific, I have a
many tables with fields: Display Date, Begin Time and End
Time. An example record would be: 02-Jan-2004 12 CST
(Display Date), 1/2/04 12:00 am (Begin Time), and 12:59 am
(End Time). I work in Hawaii, so I am trying to convert
the date and time for all queries to Hawaii Standard Time,
which is 5 hours behind Central Standard Time. Are you
suggesting creating a function within a code module? In
any case, I am not familiar with creating this type of
procedure. Can you provide a list of steps on how I might
create this?

Very much appreciated,
Rudy
 
K

Ken Snell

To clarify what I understand, what you want to do is to import the data and
convert the time to a different time zone when you store the data in the
table?

Assuming that this is correct, I recommend a two-step process:
(1) Import the original data into a temporary table.
(2) Run an append query that copies the data to a permanent table.
However, in this query, instead of using the date/time fields by the names
in the temporary table, create calculated fields that will convert them to a
date/time that is five hours behind CST. Such as this:
ConvDisplayDate: DateAdd("h", -5, [DisplayDate])
Do this for all three date/time fields by making a calculated
field for each in similar manner. This will convert the data to your desired
time zone and then store the converted data in the permanent table.
 

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