<?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: Creating date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406860#M99128</link>
    <description>&lt;P&gt;Split the date up with the month() and year() functions and then rebuild it with the mdy() function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;

input account_id reporting_date payment_day;
informat reporting_date  date9.;
format reporting_date  date9.;
cards;
1000 31JAN2017 10
1000 28FEB2017 10
1000 31MAR2017 10
1000 30APR2017 10
1000 31MAY2017 10
2000 31JAN2017 15
2000 28FEB2017 15
2000 31MAR2017 15
2000 30APR2017 15
;
run;

data want(drop= rmon ryear);
	format due_date date9.;
	set have;
	rmon=month(reporting_date);
	ryear=year(reporting_date);
	due_date=mdy(rmon,payment_day,ryear);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 24 Oct 2017 09:32:56 GMT</pubDate>
    <dc:creator>ChrisBrooks</dc:creator>
    <dc:date>2017-10-24T09:32:56Z</dc:date>
    <item>
      <title>Creating date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406856#M99126</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following dataset&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;

input account_id reporting_date payment_day;
informat reporting_date  date9.;
format reporting_date  date9.;
cards;
1000 31JAN2017 10
1000 28FEB2017 10
1000 31MAR2017 10
1000 30APR2017 10
1000 31MAY2017 10
2000 31JAN2017 15
2000 28FEB2017 15
2000 31MAR2017 15
2000 30APR2017 15
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;what I need is to use payment day and reporting month to get payment due date for each particular reporting month. For example for the first record the desired output will be 10JAN2017 and second record 10FEB2017&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 09:18:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406856#M99126</guid>
      <dc:creator>Adnan_Razaq</dc:creator>
      <dc:date>2017-10-24T09:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Creating date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406860#M99128</link>
      <description>&lt;P&gt;Split the date up with the month() and year() functions and then rebuild it with the mdy() function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;

input account_id reporting_date payment_day;
informat reporting_date  date9.;
format reporting_date  date9.;
cards;
1000 31JAN2017 10
1000 28FEB2017 10
1000 31MAR2017 10
1000 30APR2017 10
1000 31MAY2017 10
2000 31JAN2017 15
2000 28FEB2017 15
2000 31MAR2017 15
2000 30APR2017 15
;
run;

data want(drop= rmon ryear);
	format due_date date9.;
	set have;
	rmon=month(reporting_date);
	ryear=year(reporting_date);
	due_date=mdy(rmon,payment_day,ryear);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 24 Oct 2017 09:32:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406860#M99128</guid>
      <dc:creator>ChrisBrooks</dc:creator>
      <dc:date>2017-10-24T09:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: Creating date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406863#M99129</link>
      <description>&lt;P&gt;You could use something like the following:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;payment_due_date = mdy(month(reporting_date), payment_day, year(reporting_date));&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards, Jos&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 09:43:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-date/m-p/406863#M99129</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2017-10-24T09:43:02Z</dc:date>
    </item>
  </channel>
</rss>

