Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to get the last date of a week??
Valery Yourinsky ïèøåò â ñîîáùåíèè <36b039ee.0_at_192.168.2.10> ...
>Violin ßØèÕâ Ò áÞÞÑéÕÝØØ <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!
>
>
> Simply add 7 days...
Correction (patch :-)!!!
Simply add 6 (six) days...
SQL> select trunc(to_date('19990628','yyyymmdd'),'day')+6 "MON_DATE"
from dual; ^^^ !!!MON_DATE
Valery Yourinsky Received on Thu Jan 28 1999 - 05:08:35 CST