Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to group a date field by month or day ?

Re: How to group a date field by month or day ?

From: fumi <fumi_at_tpts5.seed.net.tw>
Date: 20 Aug 1999 11:51:06 GMT
Message-ID: <7pjffa$s4j$6@news.seed.net.tw>

<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



1999/08/31 14:52:36 Received on Fri Aug 20 1999 - 06:51:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US