dcsimg
How do i check the date entered (in mm-dd-yyyy format)is less than current date in Java
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ARVIND_DAGA
Posted On:   Tuesday, June 11, 2002 08:31 AM

How do i check the date entered (in mm-dd-yyyy format)is less than the current date in Java .


Date is coming from HTML form via request.getparameter as a string in the form (mm-dd-yyyy)

Re: How do i check the date entered (in mm-dd-yyyy format)is less than current date in Java

Posted By:   George_Tzallas  
Posted On:   Wednesday, June 12, 2002 01:59 AM

An alternative is to use java.util.Calendar.after (java.lang.Object)


You might also want to check java.text.DateFormat.parse (String) to convert the
entered date to a java.util.Date object.


Kind regards


George T

Re: How do i check the date entered (in mm-dd-yyyy format)is less than current date in Java

Posted By:   Andrew_Postoyanets  
Posted On:   Tuesday, June 11, 2002 08:42 AM


Just one of the many possible solutions
Utilizing StringBuffer class, convert it to the int in the format yyyymmdd and compare it with another int representing the current date in the same format.
About | Sitemap | Contact