<?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 date values from a character variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-date-values-from-a-character-variable/m-p/347230#M80166</link>
    <description>&lt;P&gt;It partly depends on the data but not dates would be missing so delete all records where ADT is missing.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2017 06:03:26 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-04-05T06:03:26Z</dc:date>
    <item>
      <title>How to date values from a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-date-values-from-a-character-variable/m-p/347226#M80165</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;In my data the variable 'orres' is chracter variable with different values. I need to make the program work only obs containing dates.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program below gave me the output I need. I am using length function to select dates. &amp;nbsp;&lt;/P&gt;&lt;P&gt;But If a ORRES value with length equal to 10 and not date .How to skip the values that are not dates. Thank you very much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data one;
length orres $200;
input orres ;
datalines;
06:00
21:00
2016-02-29
2017-02-13
;
data two;
set one;
if length(orres)=10 then adt=input(orres,yymmdd10.);
format adt date9.;
if adt &amp;gt; '10feb2017'd then delete;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2017 05:33:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-date-values-from-a-character-variable/m-p/347226#M80165</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2017-04-05T05:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to date values from a character variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-date-values-from-a-character-variable/m-p/347230#M80166</link>
      <description>&lt;P&gt;It partly depends on the data but not dates would be missing so delete all records where ADT is missing.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2017 06:03:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-date-values-from-a-character-variable/m-p/347230#M80166</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-04-05T06:03:26Z</dc:date>
    </item>
  </channel>
</rss>

