RE: java.util.Date() into a java.sql.Date

2001-10-17 Thread Rajeswari Venkatachalam
-Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, October 17, 2001 2:21 PM > To: [EMAIL PROTECTED] > Subject: RE: java.util.Date() into a java.sql.Date > > > I tried this but I get the ORA-00947 error:not enough values.

RE: java.util.Date() into a java.sql.Date

2001-10-17 Thread Graham . Forte
field? Thanks to all that replied, I will keep trying to get this to work(seems like such a simple task) Graham -Original Message- From: David Sean Taylor [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 17, 2001 12:08 PM To: [EMAIL PROTECTED] Subject: RE: java.util.Date() into a java.sq

Re: java.util.Date() into a java.sql.Date

2001-10-17 Thread Santiago Gala
[EMAIL PROTECTED] wrote: >Hi, I have a prepared statement that requires a date for Oracle db. >Basically it is a field that records time and date that record was >created(timestamp). I use this to get time and date : >java.util.Date utilDate = new java.util.Date(); >//Now I need to convert this u

RE: java.util.Date() into a java.sql.Date

2001-10-17 Thread David Sean Taylor
with oracle all dates are actually timestamps, so you can use jdbc timestamps: java.util.Date date = new java.util.Date(); // get timestamp now java.sql.Timestamp timeStamp = new java.sql.Timestamp(date.getTime()); ps.setTimestamp( 2, timeStamp ); > -Original Message- > From: [EMAIL PR