anumoses
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
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
to_char(DATE '2011-08-22','fmDay')
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks
ASKER
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
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
and your table instead of dual