<?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 how to replace date value ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42613#M8724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have a dataset which contains one variable date/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable - date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;06/20/2010&lt;/P&gt;&lt;P&gt;06/16/2010&lt;/P&gt;&lt;P&gt;06/22/2010&lt;/P&gt;&lt;P&gt;06/20/2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to replace the value of 06 ( month ) with 04 and 2010 ( year ) with 2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i achieve this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Aug 2011 08:50:32 GMT</pubDate>
    <dc:creator>Cherry</dc:creator>
    <dc:date>2011-08-04T08:50:32Z</dc:date>
    <item>
      <title>how to replace date value ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42613#M8724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi i have a dataset which contains one variable date/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Variable - date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;06/20/2010&lt;/P&gt;&lt;P&gt;06/16/2010&lt;/P&gt;&lt;P&gt;06/22/2010&lt;/P&gt;&lt;P&gt;06/20/2010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i want to replace the value of 06 ( month ) with 04 and 2010 ( year ) with 2011.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i achieve this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 08:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42613#M8724</guid>
      <dc:creator>Cherry</dc:creator>
      <dc:date>2011-08-04T08:50:32Z</dc:date>
    </item>
    <item>
      <title>how to replace date value ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42614#M8725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose your date is a valid sas date. This value is a number into your dataset.&lt;/P&gt;&lt;P&gt;the intnx function is the best way to increase or decrease your date values.&lt;/P&gt;&lt;P&gt;new_month = intnx('month',date,1); /* this adds one month to your date */&lt;/P&gt;&lt;P&gt;new_month2 = intnx('year',new_month,1); /* this adds one year to your date */&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it's text you can use substring and convert your date to a sas date using the mdy(month,day,year) function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 12:39:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42614#M8725</guid>
      <dc:creator>mojerry2</dc:creator>
      <dc:date>2011-08-04T12:39:49Z</dc:date>
    </item>
    <item>
      <title>how to replace date value ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42615#M8726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you only want to change certain dates, you could do it with something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat date mmddyy10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; format date mmddyy10.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input date;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;06/20/2010&lt;/P&gt;&lt;P&gt;06/16/2010&lt;/P&gt;&lt;P&gt;06/22/2010&lt;/P&gt;&lt;P&gt;06/20/2010&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if month(date) eq 6 then date=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mdy(4,day(date),year(date));&lt;/P&gt;&lt;P&gt;&amp;nbsp; if year(date) eq 2010 then date=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mdy(month(date),day(date),2011);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Aug 2011 13:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42615#M8726</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2011-08-04T13:10:54Z</dc:date>
    </item>
    <item>
      <title>how to replace date value ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42616#M8727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Sir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your time. This is really useful to me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2011 06:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-replace-date-value/m-p/42616#M8727</guid>
      <dc:creator>Cherry</dc:creator>
      <dc:date>2011-08-05T06:59:18Z</dc:date>
    </item>
  </channel>
</rss>

