This question is a bit off topic for this newsgroup.  But I hate it when
some responds by just saying "this question is off topic".

A java.sql.Date is a direct descendent of a java.util.Date.  Therefore you
may use something like:
int result = myUtilDate.compareTo(mySQLDate);
if (result == 0)
    // they are equal
else if (result < 0)
   // myUtilDate is before mySQLDate
else
   // mySQLDate is before myUtilDate


----- Original Message -----
From: Srinivasan Sudhir <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 02, 2000 9:02 AM
Subject: how to compare sql.date and util.date ?


> environment : java1.2.2 ,jwsdk1.0.1 oracle 8.0.4
>
> I have to generate a work allocation week applet which communicates
> withservlets running in back end
> to do so the dates generated in to draw up the chart can be derived from
> java.util.date but when i retrieve from the database if i use the
getDate()
> func it returns a java.sql.date
> how can i compare the two?
> can i use java.util.date to input into the database?
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to