Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Sql Querry related to date datatype
WHERE to_char(your_date_field, 'DD') = '01' AND your_date_field BETWEEN
'02-JAN-97' AND '02-APR-97'
will give you Feb 1, March 1, April 1 1997
(Use 02 for the last month to be sure to get all entries for the 1st (assuming that's what you want) due to the time segment of the date field)
Parvinder Singh <parora_at_questone.com> wrote in message
news:38479F1B.E2DCEA9F_at_questone.com...
>
> Hi all
>
> How can i get all the months from jan1997 to mar1999 ...
> or for that matter any range of months...within a single SQL querry
> or in other words i have the date 01-Jan-1997 and 01-Mar-1999 and
> i want all the intermediate dates of every month ...like 01-Feb1997
> 01-Mar-19997 , 01-Apr-1997 ..
> .and so on ..(just the starting dates of the intermediate months)
>
> Thanks in advance
> Regards
>
> Parvinder
>
> (also reply to parora_at_questone.com)
>
Received on Fri Dec 03 1999 - 09:33:46 CST