File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Getting MEAN with Mongo, Express, Angular, and Node
this week in the
JDBC and Relational Databases
How do I set a sql Date object to null using JDBC
Joined: May 17, 2009
Dec 09, 2009 15:14:52
Hi friends, I wanna insert a record in my table and I want the date field to appear as NULL
java.util.Date utilDate = null; java.sql.Date sqlDate = null; utilDate = new java.util.Date(); sqlDate = new java.sql.Date(utilDate.getTime());
but this will give me current time?
Any suggestions thank you.
got it never mine solved it
Joined: Oct 23, 2005
Dec 09, 2009 15:32:56
Why don't you post your solution in case anyone has a similar issue?
[OCA 8 Book]
I agree. Here's the link:
subject: How do I set a sql Date object to null using JDBC
how to convert java.util.date to java.sql.date
java.util.Date to java.sql.Date
Oracle Date/Time field
Convert java.util.Date to java.sql.Date
util.Date to sql.Date
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015