Subject | Re: Date extract from TIMESTAMP |
---|---|
Author | GrumpyRain |
Post date | 2004-11-23T23:50:26Z |
>? and ?
> 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
>There is no need to cast it as a date:
> (where ? are parameters)
>
>
> Regards
> Boguslaw Brandys
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.