aspose file tools
The moose likes Beginning Java and the fly likes String conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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
Bartender

Joined: Aug 16, 2005
Posts: 12950
    
    3

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 7 API documentation
Scala Notes - My blog about Scala
Mohamed Sanaulla
Bartender

Joined: Sep 08, 2007
Posts: 2946
    
  15

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
Ranch Hand

Joined: Jan 08, 2009
Posts: 1237

As said you can use the SimpleDateFormat class.

Following is a sample code snippet


Swastik
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: String conversion
 
Similar Threads
How to convert byte array into string array?
date format with MS Access database
Tech Word Game
WA #1.....word association
ResultSet to Array