i have dataset like this
Webinar Startdates date
A 01july2015 07July2015
B 31may2015 07July2015
C1 03july2015 07July2015
C2 30Feb2015 07July2015
C3 01May2015 07July2015
my required dataset is
Webinar Startdates date Dates Number
A 01july2015 07July2015 01july2015 1
02july2015 2
03july2015 3
04july2015 4
05july2015 5
06july2015 6
07July2015 7
B 31may2015 07July2015 31may2015 1
01july2015 2
02july2015 3
03july2015 4
04july2015 5
05july2015 6
06july2015 7
07July2015 8
C1 03july2015 07July2015 03july2015 1
04july2015 2
05july2015 3
06july2015 4
07July2015 5
C2 05Jul2015 07July2015
06july2015 1
07July2015 2
C3 30May2015 07July2015 30May2015 1
31may2015 2
01july2015 3
02july2015 4
03july2015 5
04july2015 6
05july2015 7
06july2015 8
07July2015 9
Help me.Thanks in Advance.
Assuming your start and end dates are SAS date valued variables:
data want;
set have;
number=0;
do dates = Startdates to date;
number + 1;
output;
end;
run;
Just a do loop with explicit output.
Assuming your start and end dates are SAS date valued variables:
data want;
set have;
number=0;
do dates = Startdates to date;
number + 1;
output;
end;
run;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.