<?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: Correcting dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363787#M86185</link>
    <description>&lt;P&gt;We notice that the date was wrong because&amp;nbsp;we have original patient's questionnaires and the date is actually wrong, so I need to change the date for some specific individuals because some one entered the wrong date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2017 13:03:54 GMT</pubDate>
    <dc:creator>mdsaraiv</dc:creator>
    <dc:date>2017-06-02T13:03:54Z</dc:date>
    <item>
      <title>Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363773#M86178</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having a problem correcting dates in my sas file. I already have all set sas files with dates DDMMYYYY (like 02/10/2011). Ok, but then I found that some of my dates (form some individuals) are incorrect and I want to correct it in a date step.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets supose I have the individual ID = 201 with a interview date (interdate) =&amp;nbsp;&lt;SPAN&gt;02/10/2011 but I want to correct this date to 02/12/2011.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried mane ways and I wasnt able to figure that out. I tried the date numbers between quota, with slash, with hifen....and so on. I also tried to format again the variable.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Does anybody can help me...? I will have to correct several dates. I don´t want to have to export to excell every time then correct there and then import again into SAS...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the original enterdata is correct in the format&amp;nbsp;like&amp;nbsp;&lt;SPAN&gt;02/10/2011, and it is working ok, I already caculated age of individuals from their birth date and so on.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data old; se new;&lt;/P&gt;&lt;P&gt;if ind = 201 then enterdata &amp;nbsp;= 02122011;&amp;nbsp;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 12:31:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363773#M86178</guid>
      <dc:creator>mdsaraiv</dc:creator>
      <dc:date>2017-06-02T12:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363775#M86179</link>
      <description>Hope this works&lt;BR /&gt;&lt;BR /&gt;if id=201 then enterdata="02/12/2011"d</description>
      <pubDate>Fri, 02 Jun 2017 12:37:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363775#M86179</guid>
      <dc:creator>gauthamk28</dc:creator>
      <dc:date>2017-06-02T12:37:04Z</dc:date>
    </item>
    <item>
      <title>Re: Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363777#M86180</link>
      <description>&lt;P&gt;Is there a logical rule to this? &amp;nbsp;You could as&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/129362"&gt;@gauthamk28&lt;/a&gt;&amp;nbsp;has shown use a date literal, however I really don't think that is what you will want to do for all ID with dates to change. &amp;nbsp;So how do you know the date should be Dec rather than Oct? &amp;nbsp;If you can provide a few lines of sample data in a datastep, and what the output should look like then we can provide example code.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 12:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363777#M86180</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-02T12:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363779#M86181</link>
      <description>&lt;P&gt;Date literal should be in form of '02Dec2017'd&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 12:44:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363779#M86181</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-06-02T12:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363787#M86185</link>
      <description>&lt;P&gt;We notice that the date was wrong because&amp;nbsp;we have original patient's questionnaires and the date is actually wrong, so I need to change the date for some specific individuals because some one entered the wrong date.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 13:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363787#M86185</guid>
      <dc:creator>mdsaraiv</dc:creator>
      <dc:date>2017-06-02T13:03:54Z</dc:date>
    </item>
    <item>
      <title>Re: Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363793#M86190</link>
      <description>&lt;P&gt;So you have a list of the correct dates yes? &amp;nbsp;If so then why not just merge that list on and where date1 ne date2 replace date1 with date2 - this would be the more sensible option from a data management and logical route rather than manually entering some data?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 13:15:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363793#M86190</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-06-02T13:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Correcting dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363796#M86192</link>
      <description>&lt;P&gt;Thanks, but it is not in a list, I have to grab the original questionnaire and fix it, and I want the correction to be written in sas-editor as a register so that other people will know the date was wrong and now correct. The answer of adding quotas and "d" worked well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your help&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2017 13:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Correcting-dates/m-p/363796#M86192</guid>
      <dc:creator>mdsaraiv</dc:creator>
      <dc:date>2017-06-02T13:19:52Z</dc:date>
    </item>
  </channel>
</rss>

