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

Home -> Community -> Usenet -> c.d.o.server -> Language independant getting first weekday

Language independant getting first weekday

From: Raj Gabrielse <crajware_at_hotmail.com>
Date: Wed, 7 Jul 1999 13:55:09 +0200
Message-ID: <7lvff8$h25$1@zonnetje.NL.net>


Hi group,

I've this function for reverting an isoweeknr back to a startingdate. In this function, I use the the following line to get the date of the first monday in the desired year, like so...

    a_monday :=
next_day(to_date('01/01/'||to_char(iYear),'DD/MM/RR'),'MON');

However, I'd like it to be independant of the language used for the dayname. In searching for a solution, I found the following to always return the dayname of the first weekday,

    to_char(round(sysdate,'DY'),'DY')

this always _seems_ to return 'SUN' no matter the NLS_TERRITORY value. I fear there may be a setting somewhere which could possibly alter the result of the first weekday, so has anyone else found a better way to get the name of the first weekday AND some control over the fact if the first weekday is either a SUNday or a MONday?

TIA Raj Gabrielse Received on Wed Jul 07 1999 - 06:55:09 CDT

Original text of this message

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