Re: CONSTRUCT - on datetime vars
Posted in 1993
In comp.databases.informix jparker@hpbs2561.boi.hp.com (Jack Parker) writes:
>How does one take a nice simple date from a form in a construct and query
>against a datetime field?
>I've tried using a date in the form - but get a conversion error when it
>hits SQL...
> (Lots of other things attempted)
>That is not very nice.
You're not going to like it. Not at all...
But (with DBDATE=dmy4/), these are all accepted:
SELECT * FROM Table
WHERE Datetime_fld > EXTEND(DATE("05/05/1993"), YEAR TO SECOND);
SELECT * FROM TABLE
WHERE Datetime_fld > DATETIME(1993-08-31 00:00:00) YEAR TO SECOND;
SELECT * FROM TABLE
WHERE Datetime_fld > EXTEND(DATETIME(1993-05-05) YEAR TO DAY, YEAR TO SECOND);
Oh well!
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>