Re: Help! SQL example needed for date comparison!

From: Mirza Fateh Ud Din Ahmad <fateh.ahmad_at_cressoft.com.pk>
Date: 1997/12/18
Message-ID: <3499016F.576260E6_at_cressoft.com.pk>#1/1


In informix, while doing date manipulation, you sometimes have to use 'Unit' keyword to identify the type of manipulation.

I forgot the exact syntax but it can be :

select * from table

        where table.datecolumn=today-15 unit day (to subtract 15 number of days)

select * from table

        where table.datecolumn=today-3 unit month (to subract 3 months)

select * from table

        where table.datecolumn=today-1 unit year ( to subract 1 year)

Please recheck with Informix manual to recheck this or to get exact syntax.

Regards

Fateh
fateh.ahmad_at_cressoft.com.pk

>
Received on Thu Dec 18 1997 - 00:00:00 CET

Original text of this message