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 get the last date of a week??

Re: How to get the last date of a week??

From: Stewart Burnett <Stewart_at_burnettms.nospam.demon.co.uk>
Date: Thu, 28 Jan 1999 09:17:47 -0000
Message-ID: <78p9vs$ksc$1@hagen.cloud9.co.uk>


Try adding 6 to the first day of the week -

select trunc(to_date('19990628','yyyymmdd'),'day')+6 "SUN_DATE" from dual;

Stewart Burnett

Please remove 'nospam' from address when replying direct.

Violin <violin.hsiao_at_mail.pouchen.com.tw> wrote in message news:36b00652.24762534_at_news.twsc.pouchen.com.tw...
>Hello,
>Does anyone know how to get the last date of the week?
>
>I could know the first date of the week by trunc function.......
>SQL> select trunc(to_date('19990628','yyyymmdd'),'day') "MON_DATE" from
dual;
>
>MON_DATE
>------------------
>27-JUN-99
>
>But how to get the last date of the week(03-JUL-99)???
>Thank you for your help!
>
>Violin.
>violin.hsiao_at_mail.pouchen.com.tw
Received on Thu Jan 28 1999 - 03:17:47 CST

Original text of this message

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