Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Convert datetime value to EST  RSS feed

 
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!