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 (September 2007, 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 Sep 2007 12:48:00 -0400
Reply-To:     Chang Chung <chang_y_chung@HOTMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Chang Chung <chang_y_chung@HOTMAIL.COM>
Subject:      Re: %sysfunc and date format
Comments: To: a@MAILINATOR.COM

On Wed, 5 Sep 2007 09:13:42 -0700, a@MAILINATOR.COM wrote:

>this works but not in the proc sql > >%let a=%sysfunc(putn(%sysfunc(date()) -16, yymmdd10.)); >%let b=%sysfunc(translate(%sysfunc(putn(%sysfunc(date()) -16, >yymmdd10.)),"/","-")); >%put &a &b; > >2007-08-20 2007/08/20 > >..and date = > ("%sysfunc(translate(%sysfunc(putn(%sysfunc(date()) -16, >yymmdd10.)),"/","-"))") > >produces error in sas log > >Column '2007/08/20' not found

hi, with my 9.1.3 sp4 on my win xp, i get an error doing below, too. It seems that proc sql has trouble with some macro quoted strings. Explicitly unquoting works. HTH. Cheers, Chang

%let today = (%str(%')%sysfunc(date(), yymmdds10.)%str(%'));

/* bunch of errors */ proc sql; select * from sashelp.class where '2007/01/01' < &today.; quit;

/* this works fine */ proc sql; select * from sashelp.class where '2007/01/01' < %unquote(&today.); quit;


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