Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: rOracle JDBC drivers and setting NLS_DATE_FORMAT in a logon trigger doesn't work

Re: rOracle JDBC drivers and setting NLS_DATE_FORMAT in a logon trigger doesn't work

From: Joe <yohan1701_at_nospam.space.com>
Date: Tue, 19 Mar 2002 08:51:58 -0500
Message-ID: <MPG.17010c852af112de9897b9@news.bellglobal.com>


psst did you hear what "Andre van Winssen \(andrew\)" <andrew-no-spam- svp_at_info.nl> said
> Joe,
> >>date are longs
> what do you mean ?
>

a java.util.Date is long of milliseconds since some date.

I always use a PreparedStatement
ps=conn.prepareStatement("insert into tablename (datecolumn) values(?)"); ps.setTimestamp( 1, new Timestampe( new java.util.Date() ) ); ps.executeUpdate();

if you have a string you need to covert to a date you can use java.text.DateFormat or java.text.SimpleDateFormat to parse the String.

-- 
Joe

"I bent my wookie" - Ralph Wiggum
Received on Tue Mar 19 2002 - 07:51:58 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US