?
Solved

Convert GMT Date/Time with Time Zone

Posted on 2014-04-11
7
Medium Priority
?
977 Views
Last Modified: 2014-04-11
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
Comment
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
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 7

Expert Comment

by:COACHMAN99
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 51

Accepted Solution

by:
Gustav Brock earned 2000 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

by:COACHMAN99
ID: 39994750
I forgot the time diff (dateadd) :-)
0
Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

 

Author Closing Comment

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

Author Comment

by:KANEDA 0149
ID: 39994762
Thank you too COACHMAN99, your original returned 6:43 versus 2:43. Which is the time diff missing.
0
 
LVL 75
ID: 39994802
The Master of Date/Time to the rescue ... !
:-)
0
 
LVL 51

Expert Comment

by:Gustav Brock
ID: 39994940
Thanks!

/gustav
0

Featured Post

Understanding Linux Permissions

Linux for beginners: How to view the permissions associated with files and directories and also how you can change them.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This post looks at MongoDB and MySQL, and covers high-level MongoDB strengths, weaknesses, features, and uses from the perspective of an SQL user.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question