Re: PL/SQL Week days

From: John S. Fetzik <jfetzik_at_sandc.com>
Date: Tue, 03 Aug 1999 14:10:06 GMT
Message-ID: <37a7f792.3842274_at_news.newsguy.com>


"Achille Carette" <achyl_at_infonie.be> wrote:

>A little PL/SQL question:
>
>How to check if a given date is a saturday or a sunday, staying independant
>of the NLS parameters ?
>(Oracle 8.0.5)
>
>Achille Carette
>act_at_bluegate.be
>

You should be able to use either D(returns 1-7), DY(returns 3 character day name) or DAY(returns name of day padded to 9 characters) formats. I don't think these are dependant on NLS.

Example:
vDayOfWeek TO_CHAR(vDate, 'DY');
if vDayOfWeek = 'SAT' or vDayOfWeek = 'SUN' then

.
.
.

end if;

John S. Fetzik Received on Tue Aug 03 1999 - 16:10:06 CEST

Original text of this message