Subject Re: [IBO] DateTime and IBOQuery
Author Daniel Rail
At 04/25/2002 10:04 AM, you wrote:
>insert into table1 (test1) values ('2002-04-23 23:15:21') - where
>test1 is a DateTime field

Yes this worked for me too.


>there is no problem, the data is correctly inserted. BUT if I use the
>same statement in an IBOQuery *albeit as a paramaterised query with the
>datetime value read from a DBGrid connectd to a .CSV text file, I get an
>error message:
>
>'2002-04-23 23:15:21' is not a valid date and time

I did get this error as well. When I changed the for mat of the date to
correspond the format on my system, I didn't get any errors.

One thing that you could do is change the ShortDateFormat Delphi variable
(look in the help for more information), to reflect the date format in the
string to perform this operation and when completed restore it to what it
was before.


Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.accramed.ca)