Subject Re: [firebird-support] Re: selecting between dates with timestamps fields
Author Matthias Hanft
Svein Erling Tysvær wrote:
>
> you can miss some records from the last second (let's say 02-01-2012
> 23:59:59.1234).

How "exact" is a Firebird timestamp at all, and could I use fractions
of a second in a query? For example

where MyTimeStamp between '02-01-2012 00:00:00.0000' and '03-01-2012
23:59:59.9999'

instead of

> where MyTimeStamp between '02-01-2012' and '03-01-2012' and cast(MyTimeStamp) as Date =
> '02-01-2012'
> will get you all AND use an index (BETWEEN uses the index, CAST ascertains you return the correct
> rows).

Or, would

where MyTimeStamp>='02-01-2012' and MyTimeStamp<'03-01-2012'

use the index? (I guess this would return the correct rows, too.)

-Matt