GMT to EST time change in query.

absolut

New Member
Joined
May 11, 2004
Messages
16
I am pulling in data from a database the field is called "CTIME" in the following format 9/27/2004 4:11:21 PM, this time is in GMT. I need in the simple query process to change this to EST which needs to change the date as well if the difference puts it to the prior day.

Any suggestions. Thanks in advance.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try using the DateAdd function.

ESTTIME:DateAdd("h", -6, [CTIME])

By the way I'm just guessing 6, change that as needed.
 
Upvote 0
Where does this line go?

I tried it in the criteria line in the design view and got this error The expression you entered has an invalid .(dot) or ! operator or invalid parentheses.
 
Upvote 0
It goes in the first line where you would normally put the field.

When you run the query you should see an extra field called ESTTIME.

Do you actually want to update the value in the table?
 
Upvote 0
That worked perfect. I am actually changing the value in the final linking result table.

Thank you for saving me countless hours.
 
Upvote 0

Forum statistics

Threads
1,221,889
Messages
6,162,624
Members
451,778
Latest member
ragananthony7911

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top