Solved

# Convert GMT Date/Time with Time Zone

Posted on 2014-04-11
968 Views
In access query, how do you convert a date/time with time zone in GMT format into standard Eastern GMT.  For example:

ORIGINAL FIELD VALUE
2013-07-25T18:43:01.000Z

UPDATED FIELD VALUE
7/25/2013 2:43 PM

Thanks!
0
Question by:KANEDA 0149
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2
• 2
• 2
• +1

LVL 7

Expert Comment

ID: 39994696
try:
CDate(Replace(Left("2013-07-25T18:43:01.000Z", InStr(1, "2013-07-25T18:43:01.000Z", ".") - 1), "T", " "))

not pretty but works :-)
0

LVL 50

Accepted Solution

Gustav Brock earned 500 total points
ID: 39994708
First convert to date/time:

strTime = "2013-07-25T18:43:01.000Z"

datTime = CDate(Left(Replace(strTime, "T", " "), 19))

Then expand to convert to local time:

datTime = DateAdd("h", -4, CDate(Left(Replace(strTime, "T", " "), 19)))

/gustav
0

LVL 7

Expert Comment

ID: 39994750
I forgot the time diff (dateadd) :-)
0

Author Closing Comment

ID: 39994757
Thank you Gustav, that worked exactly as I needed.
0

Author Comment

ID: 39994762
Thank you too COACHMAN99, your original returned 6:43 versus 2:43. Which is the time diff missing.
0

LVL 75

Expert Comment

ID: 39994802
The Master of Date/Time to the rescue ... !
:-)
0

LVL 50

Expert Comment

ID: 39994940
Thanks!

/gustav
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

### Suggested Solutions

This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
###### Suggested Courses
Course of the Month9 days, 7 hours left to enroll