Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL SQL - how to get the first day of the week
SELECT sysdate - (to_number(to_char(sysdate, 'D')) - 1) from dual
Replace sysdate with any date you want. The D option will give the the day of the week. Day 1 is a sunday, so I hope you want the sunday.
In article <391705B4.6BDAC7D4_at_tool42.com>,
Carsten Jacobs <carsten.jacobs_at_tool42.com> wrote:
>
> 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.
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon May 08 2000 - 00:00:00 CDT