wood burning stoves 2.0*
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
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date