Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Convert datetime value to EST

 
Rama Krishna Ghanta
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an XML file in which one of the nodes has a datetime value of format '2008-08-16T23:42:00Z'. When I read the xml file, I read this datetime value as a String. How can I convert this datetime value to a EST and display it as yyyy-MM-dd HH:MI:SS?
 
Travis Hein
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about with the SimpleDateFormat

(exception handling, imports, and method bodies excluded for clarity)
 
Rama Krishna Ghanta
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much Travis. That worked for me.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic