Re: ODBC , date in Informix
Posted in 1999
Infohos wrote:
> When I try to fire a select that uses a Date-format ('yyyy-mm-dd') , it
> give me the wrong records ,
> Select * from XXX where date = 1975-12-30 , gives me the records where the> date is 1905-10-17 ...
>
> I did not have the time to look it up , so I am asking if somebody could
> explain , what the format is in ODBC , if i want to use DATE-values ...
>
> Hoping you can help me ...
>
> Filip Wtterwulghe
> Infohos
Try 'Select * from XXX where date = "1975-12-30"'. Without the quotes around
the date, the date expression is interpreted as a subtraction problem,
resolving to the integer value 1933. This is not an problem ODBC problem, it
will also happen within dbaccess on the database server.
Mark Collins
mcollins@us.dhl.com