long str  =  (java.util.Date)transDate_.getTime();
          java.sql.Date sqldate  =  new java.sql.Date(str);

insert this sqldate into the database


Regards

Ramesh Kesavanarayanan

Electronic Data Systems
Steeple Reach,
25, Cathedral Road,

  91-44-811 3801 to 15 ext :2186
  91-44-233 0380 (res)
 [EMAIL PROTECTED]
 [EMAIL PROTECTED]



-----Original Message-----
From: Howard Hiew [mailto:[EMAIL PROTECTED]]
Sent: Friday, February 02, 2001 3:45 PM
To: [EMAIL PROTECTED]
Subject: Re: convert to sql.Date


Hi all,
        I am using prepareStatement for my query,
        May I know how to convert a string or util.Date to sql.Date?
        So that it can be inserted to databse.

Thanks in advanced.


Best Regards,
Howard

___________________________________________________________________________
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