Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Day of week function?

Re: Day of week function?

From: George Jansen <gjansen_at_cs.umd.edu>
Date: 3 Jun 1998 12:07:05 GMT
Message-ID: <6l3e99$jbk$1@walter.cs.umd.edu>


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')||'*'



*FRIDAY * George Jansen Received on Wed Jun 03 1998 - 07:07:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US