<?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 Re: Counting how many times between dates in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630805#M20863</link>
    <description>&lt;P&gt;For the first question, it would be how many posts for each year.&lt;/P&gt;</description>
    <pubDate>Tue, 10 Mar 2020 06:27:48 GMT</pubDate>
    <dc:creator>nimedina</dc:creator>
    <dc:date>2020-03-10T06:27:48Z</dc:date>
    <item>
      <title>Counting how many times between dates</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630797#M20860</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some two problems asking as followed while using SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. To find out how many times for each year.&lt;/P&gt;&lt;P&gt;2. To find out how many times after JAN202017.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;How many of tweets has Mr. President made each year (give total number tweets for each year?)&lt;/LI&gt;&lt;LI&gt;How many of tweets has Mr. President made after he became president (find this date online)? *(JAN.20.2017)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data set is as followed in the photo (not the full data set shown).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Source&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Text&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Time&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Retweet_count&lt;/P&gt;&lt;P&gt;Twitter for iphone&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Goodmorning...&amp;nbsp; &amp;nbsp; &amp;nbsp;24MAR2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12:01:44&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 76002&lt;/P&gt;&lt;P&gt;Twitter for iphone&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;.....................&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;24MAR2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12:01:44&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;76002&lt;/P&gt;&lt;P&gt;Twitter for iphone&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;......................&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 24MAR2019&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;12:01:44&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;76002&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 06:34:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630797#M20860</guid>
      <dc:creator>nimedina</dc:creator>
      <dc:date>2020-03-10T06:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Counting how many times between dates</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630804#M20862</link>
      <description>&lt;P&gt;For the fist question: do you want to specify the year, or do you need the number for each year you have?&lt;/P&gt;
&lt;P&gt;For the later try:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=have nway;
  class Date;
  format Date year4.;
  output out=counted(drop=_type_ rename=(_freq_=count)):
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 06:23:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630804#M20862</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-03-10T06:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: Counting how many times between dates</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630805#M20863</link>
      <description>&lt;P&gt;For the first question, it would be how many posts for each year.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2020 06:27:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630805#M20863</guid>
      <dc:creator>nimedina</dc:creator>
      <dc:date>2020-03-10T06:27:48Z</dc:date>
    </item>
    <item>
      <title>Re: Counting how many times between dates</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630806#M20864</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/315881"&gt;@nimedina&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;For the first question, it would be how many posts for each year.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then the code i posted should be a solution for the first question. I have, of course, assumed, that the date you have is a proper sas date and not a string.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 06:51:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630806#M20864</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-03-10T06:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Counting how many times between dates</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630807#M20865</link>
      <description>&lt;P&gt;The second is very easy in SQL:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
create table want as
select count(*)  as count_of_tweets
from have
where date ge '20jan2017'd;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Mar 2020 07:32:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/630807#M20865</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-03-10T07:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counting how many times between dates</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/631178#M20888</link>
      <description>&lt;P&gt;1. You can use group by for the same:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table want as&amp;nbsp;&lt;/P&gt;&lt;P&gt;select year(date) as yr, count(*) as cnt_tweets from have&lt;/P&gt;&lt;P&gt;group by yr;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The solution of 2 has been given earlier&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Mar 2020 09:07:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Counting-how-many-times-between-dates/m-p/631178#M20888</guid>
      <dc:creator>akanshya142</dc:creator>
      <dc:date>2020-03-11T09:07:32Z</dc:date>
    </item>
  </channel>
</rss>

