wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes String conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "String conversion" Watch "String conversion" New topic
Author

String conversion

reena Mehta
Greenhorn

Joined: Nov 17, 2010
Posts: 24

I want to convert String in to Date format
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14269
    
  21

You can use the class java.text.SimpleDateFormat to do that - look it up in the API documentation.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3071
    
  33

Additionally you can check out: JavaDatesFaq. I always keep sharing this link for every String-Date related queries


Mohamed Sanaulla | My Blog
Bobby Smallman
Ranch Hand

Joined: Sep 09, 2010
Posts: 107
When in doubt, check the API. Not only will it help you become to have a better understanding of Java but going through the API yourself is definitely faster than waiting for responses on a forum (even if the Ranch has incredibly fast responses!). Good luck to you!


Everyday in every way, we get a little better.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1477
    
    6

As said you can use the SimpleDateFormat class.

Following is a sample code snippet


Swastik
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: String conversion