Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Day of week function?
Vents Lauva (vents_lauva_at_mailserv.fix.lv) wrote:
: Mark Aurit wrote:
: > if day_of_week_is('Friday',sysdate) then
: > ... perform friday processing
: > else
: > ... perform other days processing
: > end if
: Try:
: if to_char(sysdate,'DAY') = 'FRIDAY' then .....
Having burned myself on this one before, I'd like to warn the reader to use RTRIM (unless, of course, you're only interested in Wednesday processing!):
1* select '*' || to_char(to_date('05-JUN-98'),'DAY') || '*' from dual SQL> / '*'||TO_CHAR(TO_DATE('05-JUN-98'),'DAY')||'*'
![]() |
![]() |