[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 utilDate into a sqlDate to use in a prepared >statement. I need this: October 17, 2001 11:00:00PM which util gives me but >I cant get it to sql type >ps.setDate(2,sqlDate); > > >How can I convert or better yet grab the current date/time as a sql.Date to >begin with. >THANKS!! > http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html#getTime() http://java.sun.com/products/jdk/1.2/docs/api/java/sql/Date.html#Date(long)
> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
