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 2000, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 25 Jul 2000 23:22:36 +0200
Reply-To:     patrick.matter@gmx.ch
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         patrick matter <patrick.matter@SWISSONLINE.CH>
Subject:      Re: date resolution - correction to previous email
Content-Type: multipart/mixed;

Dies ist eine mehrteilige Nachricht im MIME-Format. --------------8017A9477727557E7F1C7FDC Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit

david

this should help (tested):

%let threemon = '2000-05-01 00:00'; %let current = '2000-06-01 00:00'; %let nextmon = '2000-07-01 00:00';

%let begin=%sysfunc(inputn(%substr(&threemon,2,11),yymmdd10.)); %let end =%sysfunc(inputn(%substr(&nextmon,2,11),yymmdd10.));

data _null_; date='08jun2000:05:30:10'dt; tempdat = datepart(date);

if tempdat >= &begin and tempdat <= &end then put 'inside range'; else put 'outside range'; run;

patrick

David Simmons schrieb: > > I've got three macro variables that I use throught a long program: > > %let threemon = '2000-05-01 00:00'; > %let current = '2000-06-01 00:00'; > %let nextmon = '2000-07-01 00:00'; > > I want to use the macro variables where I have the date in the following code and have it function like the code functions: > > data customer.ccref; > set credcard; > tempdat = datepart(date); > if tempdat >= '2000-05-01'd and tempdat < '2000-07-01'd; > ref_amt = -1*(amount + tax - discount); > run; > > date is a datetime variable as shown below: > DATE=30MAY2000:08:10:00.00 > > I have a feeling the solution is very simple. Thanks for your help. > > David --------------8017A9477727557E7F1C7FDC Content-Type: text/x-vcard; charset=us-ascii; name="patrick.matter.vcf" Content-Transfer-Encoding: 7bit Content-Description: Visitenkarte für patrick matter Content-Disposition: attachment; filename="patrick.matter.vcf"

begin:vcard n:Matter;Patrick tel;home:01 362 32 22 x-mozilla-html:FALSE adr:;;Allenmoosstrasse 46;Zürich;;8057;switzerland version:2.1 email;internet:patrick.matter@gmx.ch note;quoted-printable:NO SPAMMING!!!=0D=0A=0D=0AKeine Werbung !!! fn:Patrick Matter end:vcard

--------------8017A9477727557E7F1C7FDC--


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