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

Home -> Community -> Usenet -> c.d.o.tools -> Re: PL SQL - how to get the first day of the week

Re: PL SQL - how to get the first day of the week

From: Bob Fazio <rfazio_at_home.com.nospam>
Date: 2000/05/09
Message-ID: <FESR4.180047$Tn4.1382635@news1.rdc2.pa.home.com>#1/1

NEXT_DAY
Syntax
 NEXT_DAY(d, char)

Purpose
 Returns the date of the first weekday named by char that is later than the date d. The argument char must be a day of the week in your session's date language-either the full name or the abbreviation. The minimum number of letters required is the number of letters in the abbreviated version; any characters immediately following the valid abbreviation are ignored. The return value has the same hours, minutes, and seconds component as the argument d.

Example
 This example returns the date of the next Tuesday after March 15, 1992.

SELECT NEXT_DAY('15-MAR-92','TUESDAY') "NEXT DAY"      FROM DUAL; NEXT DAY



17-MAR-92  Supply a week before the week you really want
--
Robert Fazio, Oracle DBA
rfazio_at_home.com
remove nospam from reply address
http://24.8.218.197/
"Carsten Jacobs" <carsten.jacobs_at_tool42.com> wrote in message
news:391705B4.6BDAC7D4_at_tool42.com...

>
> Hi there,
>
> does anybody has a PL/SQL function which returns for a given date the
> date of the first day of the belonging week.
>
> Thanks for hints
>
> Carsten
> --
>
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is
> prohibited. If you received this in error, please contact the sender and
> delete the material from any computer.
Received on Tue May 09 2000 - 00:00:00 CDT

Original text of this message

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