<?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 find and correct a date in a dataset in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949037#M42628</link>
    <description>&lt;P&gt;Thank you. That did the trick and I was able to make the change.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Oct 2024 13:18:06 GMT</pubDate>
    <dc:creator>sasgorilla</dc:creator>
    <dc:date>2024-10-25T13:18:06Z</dc:date>
    <item>
      <title>How to find and correct a date in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949028#M42626</link>
      <description>&lt;P&gt;I have an imported dataset from excel where all dates assumed the mmddyy10. format.&amp;nbsp;I noticed in a proc freq there is an observation with a date that is an obvious error I would like to fix (as it predates the observation window).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there a way to find the observation with the date value I am looking for? A proc print that would work for normal numeric values does not work in this case.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc print data=a;
where date=09/01/1920;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I ultimately need to change the year of this date, but that hasn't worked either.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data b;&lt;BR /&gt;set&amp;nbsp;a;&lt;BR /&gt;if&amp;nbsp;date=09/01/1920&amp;nbsp;then&amp;nbsp;date2=09/01/2020;&lt;BR /&gt;else&amp;nbsp;date2=date;&lt;BR /&gt;run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance.&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, 25 Oct 2024 10:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949028#M42626</guid>
      <dc:creator>sasgorilla</dc:creator>
      <dc:date>2024-10-25T10:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to find and correct a date in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949029#M42627</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where date=09/01/1920;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;SAS thinks this means: find a date whose value is equal to 9 divided by 1 divided by 1920. I'm guessing this is not what you want.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To indicate you have date values which you would like SAS to use, you need to use this representation exactly (except either upper or lower case is allowed). Following the string with the letter d indicates to SAS this is a date.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where date = '01SEP1920'd;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So when you create &lt;FONT face="courier new,courier"&gt;data b;&lt;/FONT&gt; you need to make similar changes. I leave that part up to you as a homework assignment.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 10:59:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949029#M42627</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-10-25T10:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to find and correct a date in a dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949037#M42628</link>
      <description>&lt;P&gt;Thank you. That did the trick and I was able to make the change.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 13:18:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-find-and-correct-a-date-in-a-dataset/m-p/949037#M42628</guid>
      <dc:creator>sasgorilla</dc:creator>
      <dc:date>2024-10-25T13:18:06Z</dc:date>
    </item>
  </channel>
</rss>

