Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL: How to select date by month and/or year
raab_at_amsd3c.imib.rwth-aachen.de wrote:
>
> Hello,
>
> how can I perform a selection of a date-field by any single subfield (day, month, year ...). I tried
>
> select * from test_table where date_field like to_date('01', 'MM')
>
> and some other combinations without success (i.e. "0 rows selected").
>
> I checked the FAQs but didn't find helpful information.
>
> Thanks ind advance.
>
> Friedhelm Raab raab_at_amsd3c.imib.rwth-aachen.de
What's wrong with:
select * from test_table where to_char(date_field,'MM') = '01';
-- --- Allen Kirby AT&T ITS Production Services akirby_at_att.com Alpharetta, GA.Received on Tue May 06 1997 - 00:00:00 CDT
![]() |
![]() |