Re: Datetime column index access
Posted in 2004
Curtis Crowson wrote:
> curtis@crowson1.com (Curtis Crowson) wrote in message news:<eb5a5e2b.0401211538.3dddefcf@posting.google.com>...
>
>>Octavio G'mez <sogomez@hotmail.com> wrote in message news:<bumkj2$kaj$1@terabinaries.xmission.com>...
>
>
>>You could use between:
>>
>>select * from table1 where date_a between datetime(midnight of day)
>>datetime(11:59:59 pm of same day)>
>
> While I am correcting everyone let me correct myself.
>
> This is just wrong. I can't believe that you answered this without
> testing it. I hope no one died because of this query. (You can be much
> tougher on yourself.)
>
> It should be 23:59:59 because there are apparently 24 hours in a day.
>
> Sorry, sorry, sorry.
Well 11:59:59 PM is the same as 23:59:59! One's 12 hour, the other's 24
hour format. :-)
Your code was pseudo anyway, so looks okay.
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