if you used the java.util.Date
this object has two function
Date.before(Date obj) and
Date.after(Date Obj) which
return true or false for you.
--- Deepak <[EMAIL PROTECTED]> wrote:
> Hi all
>
> I have this problem where I need to compare two
> dates.
> The dates are in this format YYYY-MM-DD
>
> I have to do something like:
> if (date1 <= date2)
> {
> out.println("date1 falls b4 date2");
> }
> else if (date1 > date2)
> {
> out.println("date1 comes after
> date2");
> }
> Can anyone please help me here?
>
> Thanx in advance.
>
> regards
> Deepak
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with
> body: "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body:
> "set JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://archives.java.sun.com/jsp-interest.html
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.jsp
> http://www.jguru.com/faq/index.jsp
> http://www.jspinsider.com
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://archives.java.sun.com/jsp-interest.html
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.jsp
http://www.jguru.com/faq/index.jsp
http://www.jspinsider.com