Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP !!! SYSDATE
ZC <zuin_chn_at_my-deja.com> wrote in message
news:7tjull$uc1$1_at_nnrp1.deja.com...
> I need help. Bellow, after I execute the code below on Saturday and
> Sunday, I get a return of WEEKDAY. Can someone suggest why it's not
> returning WEEKDAY
>
> IF TO_CHAR(V_Sysdate, 'DAY') IN ('SATURDAY', 'SUNDAY')
> THEN
> DBMS_OUTPUT.PUT_LINE(' WEEKEND ');
> ELSE
> DBMS_OUTPUT.PUT_LINE(' WEEKDAY ');
>
> END IF;
Use TO_CHAR(V_Sysdate, 'fmDAY').
The 'DAY' date format will return a string of 9 characters, padded with
blanks.
Received on Sat Oct 09 1999 - 12:00:05 CDT