Subject | Re: [ib-support] Jaybird JAVA date conversion problem |
---|---|
Author | Luca Lafranchi |
Post date | 2003-01-10T12:07:47Z |
Hi Claus :)
java.sql.PreparedStatement pstmt =
connection.prepareStatement("select * from table1 where my_date <> ?");
pstmt.setDate(1,myDateObject);//myDateObject is instance of java.sql.Date
java.sql.ResultSet rset = pstmt.executeQuery();
By doing so you let the driver do the conversion work for you.
Ciao
Luca
> select * from table1 where my_date <> "17.11.1858" (or null or aIf I where you, I would use a PreparedStatement, like this:
> special date my birthday "09.04.1961" or other date)
> the same here "... where my_date <> '1858-11-17 00:00:00 +0000' ...
java.sql.PreparedStatement pstmt =
connection.prepareStatement("select * from table1 where my_date <> ?");
pstmt.setDate(1,myDateObject);//myDateObject is instance of java.sql.Date
java.sql.ResultSet rset = pstmt.executeQuery();
By doing so you let the driver do the conversion work for you.
Ciao
Luca