Re: JDBC and date format
Posted in 2000
Topics: Connectivity: ODBC / JDBC / .NET, Server Administration, Java & JDBC Development
Piotr
You can set an environment variable in the JDBC URL, just append
;DBDATE=MDY4-
and see if it works.
HTH
Sujit
Piotr Wawrzyniak <Piotr.Wawrzyniak@put.poznan.pl> on 11/07/2000 08:06:53 AM
Please respond to Piotr Wawrzyniak <Piotr.Wawrzyniak@put.poznan.pl>
To: informix-list@iiug.org
cc:
Subject: JDBC and date format
Hi !
I have been half day changing the values of DBDATE (to MDY4-) and GL_DATE(to
%m-%d-%Y) (both, on the client and server side)(the server and client work
on WinNT) to execute properly
select * from text where date(anydate) = '11-07-2000' --anydate is datetimecolumn
from Java using JDBC and I always get the "String to date conversion error".
When I use the string like '00/11/07' I have no error, but I must have the
string format like mm-dd-yyyy.
If somebody know what I must change to set the proper date format for JDBC
(with the sqleditor or dbaccess I have no problem) please help.
Piotrek Wawrzyniak
Hi > You can set an environment variable in the JDBC URL, just append > > ;DBDATE=MDY4- > > and see if it works. Yes it work!, but I set ;GL_DATE=%m-%d-%Y (like Informix recommends). > Sujit Great thanks Piotrek