File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Date Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Date" Watch "Date" New topic
Author

Date

Joey Alencar
Ranch Hand

Joined: Jun 26, 2001
Posts: 43
I'd like to know how can I check if a date is valid.
(Ex: 30-FEB-01; Date is invalid).
Thanks.
Peter den Haan
author
Ranch Hand

Joined: Apr 20, 2000
Posts: 3252
If java.text.DateFormat.getDateInstance().parse(dateString) throws a ParseException, it's not a valid date...
- Peter
Joey Alencar
Ranch Hand

Joined: Jun 26, 2001
Posts: 43
Could you give one example using the format "DD/MM/YYYY"?
Thanks.
 
Don't get me started about those stupid light bulbs.
 
subject: Date
 
Similar Threads
WA #1.....word association
Hey Map - In Russia . . . . .
Just see if I could copy the log.
COUNTDOWN !!!
Strings confused!!!!please help me!