Date: Thu, 9 May 2002 13:41:20 -0400
Reply-To: qjiang <qjiang@GMCF.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: qjiang <qjiang@GMCF.ORG>
Subject: Re: Again: A tiny question?
Content-Type: text/plain; charset="iso-8859-1"
Try:
405 %let
pre_mth_1st=%sysfunc(mdy(1,1,%sysfunc(year("&sysdate"d))),yymmn6.);
SYMBOLGEN: Macro variable SYSDATE resolves to 09MAY02
406 %put &pre_mth_1st;
SYMBOLGEN: Macro variable PRE_MTH_1ST resolves to 200201
200201
-----Original Message-----
From: amy [mailto:amywang11790@YAHOO.COM]
Sent: Thursday, May 09, 2002 1:28 PM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Again: A tiny question?
%let p_cur_mth= %sysfunc( today(), yymmn6. );
This works well,
maybe a silly question, but how can I get the first month of current
year,i.e.200201:
%let p_cur_mth=????????????;
TIA,
Amy
-----Original Message-----
From: amy
To: SAS-L@LISTSERV.UGA.EDU
Sent: 5/9/02 11:14 AM
Subject: A tiny question
Hi,all
Basically, I want to use a variable to get the current month in the
format(p_cur_mth=200205);
I did the following:
%let
p_cur_mth=input(put(year(today()),$4.)||put(month(today()),$2.)),6.);
It does not work well.
Thanks for any input,
Amy
|