Subject Re: Date extract from TIMESTAMP
Author GrumpyRain
>
> Is I have TIMESTAMP field indexed (as this is FK in this table ) will
> Firebird use this index to calculate
>
> select * from sometable where cast(timestamp_field as DATE) beetwen
? and ?
>
> (where ? are parameters)
>
>
> Regards
> Boguslaw Brandys

There is no need to cast it as a date:

select *
from sometable
where timestamp_field >= mystartdate
and timestamp_field < myenddate+1

(this includes both mystartdate and myenddate)

This will use the timestamp_field index if there is one.