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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Get Previous Day (ie Last Sunday)

Re: Get Previous Day (ie Last Sunday)

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Fri, 18 Nov 2005 18:42:04 +0100
Message-ID: <437e126b$0$4287$626a14ce@news.free.fr>

"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



13/11/2005 18:40:44

1 row selected.

Regards
Michel Cadot Received on Fri Nov 18 2005 - 11:42:04 CST

Original text of this message

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