Subject | Re: [firebird-support] Using period |
---|---|
Author | Milan Babuskov |
Post date | 2004-09-02T14:49:08Z |
Planles wrote:
select * from table where extract(month from data_field) = 9
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> If I understand right, period can be selected withLook at the EXTRACT functions...
>
> 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.
select * from table where extract(month from data_field) = 9
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org