<?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: create dates based on columns in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682525#M36960</link>
    <description>&lt;P&gt;Are you able to re-shape your data?&amp;nbsp; The answer to this (and many other) programming problems would be simple to get if your data looked more like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp;YEAR&amp;nbsp; &amp;nbsp;MONTH&amp;nbsp; ENROLLED&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need many observations per ID.&amp;nbsp; If you were to do this, the programming techniques you would need to learn to process your data would be much more useful to you in future projects.&lt;/P&gt;</description>
    <pubDate>Wed, 09 Sep 2020 06:44:02 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-09-09T06:44:02Z</dc:date>
    <item>
      <title>create dates based on columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682439#M36958</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ID	MON18_01	MON18_02	MON18_03	MON18_04	MON18_05	MON18_06	MON18_07	MON18_08	MON18_09	MON18_10	MON18_11	MON18_12	MON19_01	MON19_02	MON19_03	MON19_04	MON19_05	MON19_06	MON19_07	MON19_08	MON19_09	MON19_10	MON19_11	MON19_12	MON20_01	MON20_02	MON20_03	MON20_04	MON20_05	MON20_06	MON20_07	MON20_08	enroll1	disenroll1	enroll2	disenroll2 	enroll3	disenroll3 
111111111	1	0	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	0	0	0	0	0	0	0	0	1	1	1	Jan-18	Feb-18	Mar-18	Oct-19	Jun-20	.
222222222	1	1	1	1	1	1	0	0	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	Jan-18	Jul-18	Sep-18	.		
3333333333	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	Jan-18	.				&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I am trying to add dates based on columns MON18_01&amp;nbsp; represents January 2018 etc..&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to add columns enroll and disenroll (enroll1 , disenroll1 , enroll2 , disenroll2 ,.....)&amp;nbsp;&lt;/P&gt;&lt;P&gt;for data below id 1111111 enroll1 = jan 2018 and disenroll1 = feb 2018 , enroll2 = mar- 2018&amp;nbsp; disenroll2 = oct 2019 , enroll3 = jun 2020 and disenroll = '&amp;nbsp; &amp;nbsp;'&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to do that for all the IDs being able to find the zeros and ones and assign enrollment and dis-enrollment dates based on columns&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sample data file attached&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 23:53:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682439#M36958</guid>
      <dc:creator>hk2013</dc:creator>
      <dc:date>2020-09-08T23:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: create dates based on columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682449#M36959</link>
      <description>&lt;P&gt;Most of us will not download Microsoft Office attachments as they can be a security threat. Better you should provide the data as SAS data step code (via these instructions: &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think it would also help if you showed us what the output would look like.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2020 23:37:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682449#M36959</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-09-08T23:37:00Z</dc:date>
    </item>
    <item>
      <title>Re: create dates based on columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682525#M36960</link>
      <description>&lt;P&gt;Are you able to re-shape your data?&amp;nbsp; The answer to this (and many other) programming problems would be simple to get if your data looked more like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID&amp;nbsp; &amp;nbsp;YEAR&amp;nbsp; &amp;nbsp;MONTH&amp;nbsp; ENROLLED&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You would need many observations per ID.&amp;nbsp; If you were to do this, the programming techniques you would need to learn to process your data would be much more useful to you in future projects.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Sep 2020 06:44:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/create-dates-based-on-columns/m-p/682525#M36960</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-09-09T06:44:02Z</dc:date>
    </item>
  </channel>
</rss>

