Article View: borland.public.jbuilder.java.language
Article #623Re: cast (from java.util.Date to java.sql.Date)
From: Petar Popara
Date: Thu, 31 Mar 2005 14:43
Date: Thu, 31 Mar 2005 14:43
12 lines
1146 bytes
1146 bytes
This is what I did: pstmt.setDate(2, (java.sql.Date)a.getValidFrom()); getValidFrom() returns java.util.Date. I belived it would work. :( Now I'm doing this: pstmt.setDate(2, new java.sql.Date(a.getValidFrom().getTime()));
Technical Details
Message-ID:
<424c0bdb@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailReferences:
<424c052d$1@newsgroups.borland.com> <424c0811$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: f74b3,da28624d2281bc9c X-Google-Attributes: gidf74b3,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Petar Popara" <none> Newsgroups: borland.public.jbuilder.java.language References: <424c052d$1@newsgroups.borland.com> <424c0811$1@newsgroups.borland.com> Subject: Re: cast (from java.util.Date to java.sql.Date) Date: Thu, 31 Mar 2005 16:43:25 +0200 Lines: 14 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 193.138.1.206 Message-ID: <424c0bdb@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1112280027 193.138.1.206 (31 Mar 2005 06:40:27 -0800) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!newshub.sdsu.edu!logbridge.uoregon.edu!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail