Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to group a date field by month or day ?
Another way quick way to do it is:
select last_day(date)...
where ...
group by last_day(date)
In article <7pgmi6$n57$1_at_bgtnsc02.worldnet.att.net>,
"Jill" <jc_va_at_hotmail.com> wrote:
> I believe you want TO_CHAR(yourdatefield,'MM'). This will return the
2 byte
> index for month.
>
> Michael Keppler wrote in message <7pgiql$npi_at_TGZ3>...
> >Hello there !
> >
> >In local SQL I used "EXTRACT(MONTH FROM datefield) AS M" to get the
> >month information out of a date field. How do I write this statement
for
> >Oracle SQL to group my data by month ??
> >
> >Thanks and Good Bye, Michael.
> >--
> >Michael.Keppler_at_bigfoot.com
> >
> >
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Thu Aug 19 1999 - 09:32:31 CDT