<?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: character date, expressed 30.02.2002, how to change to numeric in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196570#M49152</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use format anydtdte :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dateStr = "30.03.2002";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date = input(dateStr, anydtdte10.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dateStr = "04.03.2002";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date = input(dateStr, anydtdte10.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format date date9.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Jun 2015 01:37:29 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2015-06-01T01:37:29Z</dc:date>
    <item>
      <title>character date, expressed 30.02.2002, how to change to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196569#M49151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a variable with dates listed in a format of 30.03.2002.&lt;/P&gt;&lt;P&gt;I have tried many options without success.&lt;/P&gt;&lt;P&gt;Here are some commands I have worked with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;new date=input(olddate,date9.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newdate=input(compress(olddate,'.'),date9.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;newdate= INPUT(compress(olddate),date9.); &lt;/P&gt;&lt;P&gt;format newdate date9.;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Karen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 31 May 2015 10:14:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196569#M49151</guid>
      <dc:creator>cookvyz</dc:creator>
      <dc:date>2015-05-31T10:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: character date, expressed 30.02.2002, how to change to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196570#M49152</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use format anydtdte :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;data test;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dateStr = "30.03.2002";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date = input(dateStr, anydtdte10.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;dateStr = "04.03.2002";&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;date = input(dateStr, anydtdte10.);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;format date date9.;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;proc print; run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 01:37:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196570#M49152</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-06-01T01:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: character date, expressed 30.02.2002, how to change to numeric</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196571#M49153</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To force a correct format, I would avoid the anydtdte10. format, as it may convert some values in an unexpected fashion (03/02/2002: March 2nd or February 3rd?).&lt;/P&gt;&lt;P&gt;Instead use&lt;/P&gt;&lt;P&gt;newdate = input(olddate,ddmmyy10.);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Jun 2015 06:15:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/character-date-expressed-30-02-2002-how-to-change-to-numeric/m-p/196571#M49153</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-06-01T06:15:08Z</dc:date>
    </item>
  </channel>
</rss>

