<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Create a monthly report based on Screen date? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Create-a-monthly-report-based-on-Screen-date/m-p/872876#M344864</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to create a monthly report based on the date from Jan to Apr 2023.&amp;nbsp; Please help.&amp;nbsp; In addition, there are errors in creating the dataset.&amp;nbsp; Please correct them; thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input cust_id  date :ddmmyy10.  site;
format date ddmmyy10.;
infile datalines delimiter=',';
datalines;
2,01/04/2023,1,
6,01/24/2023,1,
3,03/04/2023,2,
8,03/18/2023,1,
4,02/05/2023,1,
7,04/05/2023,1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Monthly_Table; 
	input Site Jan2023 Feb2023 Mar2023 Apr2023; 
	infile datalines delimiter=',';  
	datalines;                     
	1,2,1,0,1,
	2,0,0,1,0,
;   &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 17:25:08 GMT</pubDate>
    <dc:creator>ybz12003</dc:creator>
    <dc:date>2023-04-28T17:25:08Z</dc:date>
    <item>
      <title>Create a monthly report based on Screen date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-monthly-report-based-on-Screen-date/m-p/872876#M344864</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I would like to create a monthly report based on the date from Jan to Apr 2023.&amp;nbsp; Please help.&amp;nbsp; In addition, there are errors in creating the dataset.&amp;nbsp; Please correct them; thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input cust_id  date :ddmmyy10.  site;
format date ddmmyy10.;
infile datalines delimiter=',';
datalines;
2,01/04/2023,1,
6,01/24/2023,1,
3,03/04/2023,2,
8,03/18/2023,1,
4,02/05/2023,1,
7,04/05/2023,1
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Monthly_Table; 
	input Site Jan2023 Feb2023 Mar2023 Apr2023; 
	infile datalines delimiter=',';  
	datalines;                     
	1,2,1,0,1,
	2,0,0,1,0,
;   &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 17:25:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-monthly-report-based-on-Screen-date/m-p/872876#M344864</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2023-04-28T17:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create a monthly report based on Screen date?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Create-a-monthly-report-based-on-Screen-date/m-p/872885#M344870</link>
      <description>&lt;P&gt;Are your dates supposed to be MONTH DAY YEAR or DAY MONTH YEAR? You use a ddmmyy informat but have values for "month" of 24. That is a data fix, not code, unless you specified the wrong informat. But we don't know what would be "right". So can't fix the code.&lt;/P&gt;
&lt;P&gt;If that data is supposed to be Jan to April then you have MONTH DAY YEAR data and the informat should be mmddyy10.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, describe the report results. Please don't make use guess. And is this supposed to be a report that people read and not a data set?&lt;/P&gt;
&lt;PRE&gt;data test;
input cust_id  date :mmddyy10.  site;
format date mmddyy10.;
infile datalines delimiter=',';
datalines;
2,01/04/2023,1,
6,01/24/2023,1,
3,03/04/2023,2,
8,03/18/2023,1,
4,02/05/2023,1,
7,04/05/2023,1
;
run;

proc tabulate data=test;
   class date site;
   format date monyy7.;
   table site,
         date*n=' '
         /misstext='0'
   ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 17:55:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Create-a-monthly-report-based-on-Screen-date/m-p/872885#M344870</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-04-28T17:55:18Z</dc:date>
    </item>
  </channel>
</rss>

