Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date Conversion

 
vikassheel gupta
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i have a problem related to date
i have a string in the "1-Aug-2000" and i want to convert it in the java.util.Date in the same format so how will i do that
thanks
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked at DateFormat and SimpleDateFormat. They have a parse method that does what it sounds like you need.
 
Stuart Gray
Ranch Hand
Posts: 410
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You will use the parse method in the SimpleDateFormat class.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24211
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's talk about this in Java in General (Beginner).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic