| Date: | Mon, 11 Oct 1999 15:33:29 GMT |
| Reply-To: | dkb@CIX.COMPULINK.CO.UK |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | dkb@CIX.COMPULINK.CO.UK |
| Organization: | CIX - Compulink Information eXchange |
| Subject: | Re: INTNX function |
|---|
Jerry Voight asks:
> Hey all!
>
> I have a job that runs 5 days a week on a mainframe production schedule
> (Tue - Sat morning). It gathers business information from the previous
> weekday. The function I use to calculate the previous weekday looks
> like:
> Y = INTNX('WEEKDAY',TODAY(),-1) ;
>
> When the job runs Saturday to gather Friday's information Y=Thursday,
> when I would like Y=Friday.
>
> Short of adding conditional logic to test for Saturday is there option
> or parameter on the INTNX function to give me Friday in the above case?
Jerry,
In the situation you describe,
Y = INTNX('WEEKDAY1W',TODAY(),-1) ;
will work fine. But if your job ever runs on a Monday morning, it will
return Saturday as the revious weekday... be careful...
HTH
Dave
.
|