Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Validate Date in JSP

843833Jun 21 2001 — edited Jun 21 2001
Hello:

I have a form with a Date text field on it.

I am trying to determine which function(s) I would use to determine if the Date that the user inputs is a valid date.

For example, the user inputs "02/31/2000". Obviously, February 31 is not a valid date. But how would I programatically determine that?

In ASP, there is a "IsValidDate" function that would do this for me. Is there a JSP equivalent?

I am familiar with the Date objects in java.util and java.sql. But I can not seem to find a function that would accomplish what I am looking for.

Can anyone help?

Thanks.

- Paul Enriquez
Johnson Controls, Inc.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 19 2001
Added on Jun 21 2001
5 comments
232 views