Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

get weekdaynum, independent from nls parameters.

WestDraytonMay 24 2010 — edited May 24 2010
What is the best way to get Weekdaynum for a date?
The algorithm should be independent from nls-parameters.

This solution depends from nls_teritory and works differently when
nls_territory='AMERICA'
and when it is ESTONIA:
select decode (
   to_char(sysdate,'DY','nls_date_language=english'), 
   'MON', 1,
   'TUE', 2,
   'WED', 3,
   'THU', 4,
   'FRI', 5,
   'SAT', 6,
   'SUN', 7
) WeekdayNum
from dual;
This post has been answered by AlanWms on May 24 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 21 2010
Added on May 24 2010
11 comments
1,111 views