Re: Select string with TODAY
Posted in 1997
If you make 'date' a DATE field then you can simply use 'WHERE date-
field = TODAY' in the SELECT statement. You can also do correct date
arithmetic on it.
I believe you can use 'LET date-field = DATE( int-field)' to convert
'int-field' to 'date-field'. I think that 'LET date-field=int-field'
will produce bizarre results as the date will be interpreted as the
number of days since 1/1/1900!
Moral: Always use DATE fields to hold dates!
In article <01bc8175$db834060$3c6bf3c2@kh>, Kerschbaumer Horst
<hkersch@bignami.it> writes
>Would anyone help me to create a SQL select string for Informix 5.0
>
>I would like to substitute the expression "<=960625" (is the current date
>in the numeric format YYMMDD ) from the following select with the function
>TODAY() and convert it in the numeric format YYMMDD
>
>SELECT * FROM table WHERE date <= 960625 (this is ok)>
>SELECT * FROM table WHERE date <= TODAY How can I convert TODAY in a>numerica integer 960625 (=YYMMDD)?
>The numeric field date contains the date's in the format. Example: 960625
>for 25th June 1996
>
>Thanks in advance!
>hkersch@bignami.it
>
>
--
Sally Woolrich