• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to convert String into Date format

 
VGR VIJAY
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to convert a string into a date format with date and time.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"date format"? Do you mean a Date object? If so, look at java.text.DateFormat and its various parse methods.
 
Shaan Shar
Ranch Hand
Posts: 1249
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should specify that in which format you are giving me the string then I can suggest you some method or function. But at least from your site I need that in which format you are specifying the String. Because there are so many format for Date . Now that depends on you in which format you need the date.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic