Link to home
Start Free TrialLog in
Avatar of anumoses
anumosesFlag for United States of America

asked on

getting day of the week from given date in oracle

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
Avatar of Sean Stuber
Sean Stuber

to_char(DATE '2011-08-22','fmDay')
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anumoses

ASKER

thanks
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
yes, use column instead of date literal

and your table instead of dual