LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 5 Jul 2006 21:59:12 +0000
Reply-To:     toby dunn <tobydunn@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         toby dunn <tobydunn@HOTMAIL.COM>
Subject:      Re: Trouble formatting macro date variable
Comments: To: paulvonhippel@YAHOO.COM
In-Reply-To:  <1152136037.811179.284270@75g2000cwc.googlegroups.com>
Content-Type: text/plain; format=flowed

Paul ,

You cant use Input and Put in the macro facility, you can use InputN, InputC, PutN, and PutC though.

Try:

%let three_days_ago = %eval (%sysfunc( Today () ) - 3 ) ; %let datestring = %sysfunc( inputn ( &Three_Days_Ago , mmddyy10 ) ) ; %put &datestring ;

I also made a couple of changes like adding an Aper to Three_Days_Ago and deleting the decimal after the format name (it is not needed in macro land).

All of this is covered in my paper schedualed to be presented at NESUG and SESUG later this year.

Toby Dunn

From: Paul <paulvonhippel@YAHOO.COM> Reply-To: Paul <paulvonhippel@YAHOO.COM> To: SAS-L@LISTSERV.UGA.EDU Subject: Trouble formatting macro date variable Date: Wed, 5 Jul 2006 14:47:18 -0700

I wonder if some clever list member can tell me the simple mistake I am making here:

%let three_days_ago = %eval (%sysfunc(today ()) - 3); %let datestring = %sysfunc (input (three_days_ago, mmddyy10.)); %put &datestring;

The error message reads "ERROR: The INPUT function referenced in the %SYSFUNC or %QSYSFUNC macro function is not found."


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