Re: Subtracting a day from java.sql.Date

"Paku, Neil" <[email protected]>
Newsgroups gmane.comp.java.sun.servlet
Message-ID <87EF6E23E5FBFC4290BF67724BF4A5725B2D8D@DOIT-EX101.exec.ds.state.ct.us>
You shouldn't need to because sql Date subclasses util Date so just call
the util Date method on your sql Date object. Check the Java SDK
documentation for sql Date and you'll see the inherited methods from
util Date.
Cheers,
        Neil.


-----Original Message-----
From: Kenny G. Dubuisson, Jr. [mailto:[email protected]] 
Sent: Tuesday, May 20, 2003 4:44 PM
To: [email protected]
Subject: Re: Subtracting a day from java.sql.Date


My limited java knowledge has to ask, how do I convert it from
java.sql.Date to java.util.Date?  Thanks, Kenny

----- Original Message -----
From: "Paku, Neil" <[email protected]>
To: <[email protected]>
Sent: Tuesday, May 20, 2003 3:00 PM
Subject: Re: Subtracting a day from java.sql.Date


> Kenny,
>         try using java.util.Date then convert it back to java.sql 
> Cheers,
>         Neil
>
> -----Original Message-----
> From: Kenny G. Dubuisson, Jr. [mailto:[email protected]]
> Sent: Tuesday, May 20, 2003 3:54 PM
> To: [email protected]
> Subject: Subtracting a day from java.sql.Date
>
>
> Hello all.  I'm trying to subtract a day from a java.sql.Date class 
> variable.  Looking at the java docs, there is no method to do this.  
> All the date modification methods belong to another class, 
> java.util.Calendar.  To be able subtract a day from my class, should I

> convert it to the Calendar class and then back to the Date class or is

> there something easier that I'm missing.  My main requirement is to 
> have it in a java.sql.Date class when done.  Any example code would be

> much appreciated (I have to admit I'm still a lightweight in Java).
>
> Thanks,
> Kenny
>
> ______________________________________________________________________
> __
> ___
> 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
>

________________________________________________________________________
___
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.