| Subject | Re: [ib-support] Problems with a date field in a query | 
|---|---|
| Author | Martijn Tonies | 
| Post date | 2002-05-07T15:10:33Z | 
Hi Xavier,
(for example). The date is stored in the mm/dd/yyyy format. I have tried
this:
SELECT * from my_table
WHERE extract(month from my_date_field) = 3
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
            > Hello,query that returns all the rows in which the month of this field is March
>
> I have a table with a field which is a date, and now I want to make a
(for example). The date is stored in the mm/dd/yyyy format. I have tried
this:
>If you're using IB6, why don't you try:
> SELECT * from my_table
> WHERE my_date_field LIKE '03%'
>
> But it doesn't work (the query returns 0 rows). How can I do it?
SELECT * from my_table
WHERE extract(month from my_date_field) = 3
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."