ANISHKA1
asked on
How to verify date in java?
I have to verify date is valid in mm/dd/yyyy formate after submittingbutton.
how do i get that?
Thanks
how do i get that?
Thanks
https://www.experts-exchange.com/questions/21748378/How-to-validate-a-date.html
You need to use DateFormat class's parse method for this.
DateFormat df=DateFormat.getDateInsta nce();
myDate = df.parse(above date string);
If you get parse exception in the above code, then the date is not in the proper format.
Check this for more details:
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html
DateFormat df=DateFormat.getDateInsta
myDate = df.parse(above date string);
If you get parse exception in the above code, then the date is not in the proper format.
Check this for more details:
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
It is perfect.