1. First you have to create a proper util.Date object
by parsing the date string selected in the table.
You can use standard parsers. Refer to java.text.
2. You then have to get the java.util.Calendar object for the
Date so created. This class has many util methods to
compare, add to, subtract from the your Date.
You can also set individual attributes like day of the week,
day of the month, month of the year etc.
Hope this helps ..
- Ajit
Dan Lopez wrote:
>
> I am selecting smalldatetime field from a table in my
> db. I would like to know how to compare the date
> values in the query to certain criteria (eg 48 hours
> ago, 10 days from now, etc...) that I specify in my
> JSP code and then display. Please help!!!!!!!!
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
> http://photos.yahoo.com/
>
> ===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
> http://java.sun.com/products/jsp/faq.html
> http://www.esperanto.org.nz/jsp/jspfaq.html
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
> http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets