The java.sql.Date that you get back is a sub-class of java.util.Date. With that and a little studying of and playing with the java.util.Calendar and java.util.GregorianCalendar java documentation and classes, you should find your answer pretty quickly. Those classes contain everything you need to do what you have explained.
Good luck.
-----Original Message-----
From: Sunita Sairaman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 05, 2000 10:46 AM
To: [EMAIL PROTECTED]
Subject: Date diff
hi,
Problem: I have a date from MS SQL Database as
java.sql.Date sqlDate=rs.getDate(3)
which gives me date as 2000-04-05.
I want to compare it with today's date and get the
difference between today's date and sqlDate. If it
is more than say 10 days then I do something.
How do I compare the 2 dates & get the difference in number of days.
~Sunita
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
___________________________________________________________________________
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
