Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Get Previous Day (ie Last Sunday)
"ct witter" <norcold1_at_yahoo.com> a écrit dans le message de news: 1132335202.776008.32240_at_z14g2000cwz.googlegroups.com...
| I'm trying to write a statement in SQL to return the date of the last
| sunday. ie today is
| '18-NOV-2005', previous sunday was '13-NOV-2005'. I don't want to use a
| function because I don't have access to create functions.
|
SQL>alter session set nls_date_language=american;
Session altered.
SQL>select next_day(sysdate,'SUNDAY')-7 from dual; NEXT_DAY(SYSDATE,'S
1 row selected.
Regards
Michel Cadot
Received on Fri Nov 18 2005 - 11:42:04 CST