Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Format With Time Zone Offset

 
David McWilliams
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to convert a date from one format to another, as follows:

2013-03-17T19:12:14Z -> 2013-03-17 19:12 +0100



Prints:
date 2013-01-17T09:00:00.000Z

Can anyone tell me how to get my desired format? I've tried everything.
 
David McWilliams
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was unable to figure out the answer so I've tried the following:



So 2013-03-17T09:00:00Z converts to 2013-03-17 09:00 +0000
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic