| 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 ?
<JemTaylor_at_yahoo.com> wrote in message news:7ph4hv$u1e$1_at_nnrp1.deja.com...
>
> Another way quick way to do it is:
>
> select last_day(date)...
> where ...
> group by last_day(date)
>
Not true. This can not be a correct solution. The LAST_DAY function does NOT truncate the "time part". See the following:
SQL> select to_char(last_day(sysdate), 'YYYY/MM/DD HH24:MI:SS') from dual;
TO_CHAR(LAST_DAY(SY
![]() |
![]() |