• Post Reply Bookmark Topic Watch Topic
  • New Topic

Parse String to Date  RSS feed

 
vivek dhiman
Ranch Hand
Posts: 155
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I have date in string ex: 2014-08-08T17:38:58.316+05:30 and want to convert into 2014/08/08 17:38:58. I am using below code :


this giving me required value, but when i replace oldDate with date1 it shows me exception that not parse to date. Actually i am getting date in string of 2014-08-08T17:38:58.316+05:30 which i need to convert into date 2014/08/08 17:38:58. To convert into date i am using below code :


The issue is to convert 2014-08-08T17:38:58.316+05:30 into 2014/08/08 17:38:58.

Thanks
 
Knute Snortum
Sheriff
Posts: 4270
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you post the complete code that is getting the error plus the text of the error?

I don't understand, when you say "i replace oldDate with date1". These two dates have a different format. That's why I'd like to see the complete code.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!