This is off-topic for a JSP list. This has two primary areas of concern:
JDBC and core Java: JDBC because you're retrieving a date from a database
(as a string, which is incorrect) and core Java because you're comparing two
Date objects.

However, because Alan has put me in a good mood by asking a question and
then requesting that I not answer...

You have a few solutions. One is to retrieve a timestamp from the DB instead
of a string, but this only works if it's stored as a date. Another solution
is to parse the string into a Date (via java.text.DateFormat) and compare
the resulting objects that way. I'm sure other original minds can find more.


>From: ems vasudevan <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: comparing date objects
>Date: Tue, 6 Feb 2001 05:01:22 -0800
>
>       Hi Gurus!
>I have  to compare two date objects.one is returned
>from System.currentimemillisecond. other is a
>DateFormat Object retreived from the Database as
>string .My Backend is DB2.
>Pls help.
>Regds with advanced thanks.
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! Auctions - Buy the things you want at great prices.
>http://auctions.yahoo.com/
>
>===========================================================================
>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://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

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

===========================================================================
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://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

Reply via email to