data report;
input dat tran;
format dat mmddyy8.;
cards;
10/12/98 45
10/16/98 66
10/26/98 23
11/06/00 89
11/20/00 75
11/23/00 45
11/29/00 63
Now i want the sum of tran between 10/12/98 to 10/16/98, and i want the sum of tran from 11/06/00 to 11/23/00 in to a new variable Total .if the trans is not between the mentioned dates it should remain same .
Message was edited by: Main
A set of SAS assignment statements as illustrated below will work:
IF THEN ;
ELSE IF THEN ;
ELSE ;
Explore using SAS literal strings expressed as DATE values for your defined as explained in your post. The literal must be surrounded in either single- or double-quotes suffixed with a "D" character.
You have a wealth of SAS documentation and supplemental technical / conference papers available at the SAS support http://support.sas.com/ website using its SEARCH facility or with a GOOGLE search.