This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes JSP abd Date Object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP abd Date Object" Watch "JSP abd Date Object" New topic
Author

JSP abd Date Object

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
I got a form where a user type a date in the following format:
06/23/99 how can I convert to Date object in Java?
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Check out java.text.SimpleDateFormat
Dave.
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

If you search in the Java in General (beginners) forum, you'll find a post i made about this. That particular API gave me some trouble, so take a look at the code I have there for some help.
 
Don't get me started about those stupid light bulbs.
 
subject: JSP abd Date Object