Re: Datetime column index access
Posted in 2004
Art S. Kagel wrote:
> On Wed, 21 Jan 2004 14:21:27 -0500, Octavio G'mez wrote:
>
> try:
>
> Select * from table1
> where
> date_a between extend(today, year to second)
> and extend((today+1), year to second);
I thought of that initially, but I guess that extra second could cause
issues. So I went for:
SELECT *
FROM table1
WHERE date_a BETWEEN EXTEND(TODAY, YEAR TO SECOND)
AND EXTEND(TODAY+1, YEAR TO SECOND)-1 UNITS SECOND
Or I guess you could just use >= and < instead. ;-)
Cheers,
--
Mark.
+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+
sending to informix-list