This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes Date Format With Time Zone Offset Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Date Format With Time Zone Offset" Watch "Date Format With Time Zone Offset" New topic
Author

Date Format With Time Zone Offset

David McWilliams
Ranch Hand

Joined: Mar 14, 2009
Posts: 73
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

Joined: Mar 14, 2009
Posts: 73
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Date Format With Time Zone Offset
 
Similar Threads
Struts2 datetimepicker
Parsing date using SimpleDateFormat for hh mm ss
getting wrong values using matcher.group()
Converting to UTC time zone
how to get the date from the string representation of date