getting day of the week from given date in oracle

anumoses
anumoses used Ask the Experts™
on
I need to get the day of the week for a given date

For eg 06/25/2011 - was a saturday. So I need to get as Sat.
I know there is extract function
extract(YEAR FROM DATE '2011-08-22')       would return 2011
extract(MONTH FROM DATE '2011-08-22')       would return 8
extract(DAY FROM DATE '2011-08-22')       would return 22

But I need it to return as Sat. Any help is appreciated
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2011
Top Expert 2012

Commented:
to_char(DATE '2011-08-22','fmDay')
Most Valuable Expert 2011
Top Expert 2012
Commented:
the above gives the full name

if you only need the 3 letter abbreviation


to_char(DATE '2011-08-22','Dy')

Author

Commented:
thanks

Author

Commented:
If I want to use this in oracle forms post query Can I add the column name here?
column name is sched_date

select to_char(DATE '2011-06-25','Dy') from dual
Most Valuable Expert 2011
Top Expert 2012

Commented:
yes, use column instead of date literal

and your table instead of dual

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial