<?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: How to pick up dates with ID-based data? in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513253#M2500</link>
    <description>&lt;P&gt;Thats called transposing data:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have;
  by id type;
run;
proc transpose data=have out=want prefix=dateof;
  var date;
  id type;
  idlabel type;
run;&lt;/PRE&gt;</description>
    <pubDate>Thu, 15 Nov 2018 11:26:09 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2018-11-15T11:26:09Z</dc:date>
    <item>
      <title>How to pick up dates with ID-based data?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513248#M2499</link>
      <description>&lt;P&gt;I'm new to SAS and trying to program a simple code.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Original data:&lt;BR /&gt;TableA&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; Date&amp;nbsp;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;| Type&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; 20111111 &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;A&lt;/P&gt;&lt;P&gt;2&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;20081014 &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;C&lt;/P&gt;&lt;P&gt;3&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;20051126 &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;A&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;100&amp;nbsp; 20160421&amp;nbsp; &amp;nbsp; &amp;nbsp; B&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From this original data, I want to pick up dates by Type.&lt;/P&gt;&lt;P&gt;Like following&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Result (only picking up A &amp;amp; B)&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;| DateofA&amp;nbsp; &amp;nbsp; &amp;nbsp;| DateofB&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp;| 20111111&amp;nbsp; |&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp;|&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp;| 20051126 |&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;100 |&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | 20160421&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there anyone know how to program this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 23:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513248#M2499</guid>
      <dc:creator>lsw2920</dc:creator>
      <dc:date>2018-11-15T23:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick up dates with ID-based data?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513253#M2500</link>
      <description>&lt;P&gt;Thats called transposing data:&lt;/P&gt;
&lt;PRE&gt;proc sort data=have;
  by id type;
run;
proc transpose data=have out=want prefix=dateof;
  var date;
  id type;
  idlabel type;
run;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Nov 2018 11:26:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513253#M2500</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-11-15T11:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to pick up dates with ID-based data?</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513390#M2516</link>
      <description>&lt;P&gt;If the function Year(date) for your example value of 20111111 does not return 2011 then you don't actually have "dates" you only have numeric (or possibly character) values and you might want consider creating actual date values so that you can manipulate them with the proper SAS functions and formats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Working-with-Dates-and-Times-in-SAS-Tutorial/ta-p/424354&lt;/A&gt; has a PDF with much information about dates.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2018 16:04:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-pick-up-dates-with-ID-based-data/m-p/513390#M2516</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-11-15T16:04:58Z</dc:date>
    </item>
  </channel>
</rss>

