LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (October 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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 .


Back to: Top of message | Previous page | Main SAS-L page