Subject Re: [firebird-support] Using period
Author Milan Babuskov
Planles wrote:
> If I understand right, period can be selected with
>
> select * from table where date_field between 'date1' and 'date2'.
>
> Is there any easy way to get records within one month, or should I
> explicitly write, eg. for september:
>
> select * from table where date_field between '1.9.2004' and '30.9.2004'
> ??
>
> Same question will apply to select within one week or one year.

Look at the EXTRACT functions...

select * from table where extract(month from data_field) = 9

--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org