<?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 Converting Character Date to Numeric Date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397663#M96127</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hello SAS Supoort Communities,&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;I would like to convert the additional_signature_date_1 variable in the attached SAS dataset from a character variable to a numeric variable (a numeric SAS date).&amp;nbsp; I used the following code:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;data audit.a2011p1;&lt;/DIV&gt;
&lt;DIV&gt;set audit.a2011p;&lt;/DIV&gt;
&lt;DIV&gt;date_var = input(additional_signature_&lt;WBR /&gt;date_1,date9.);&lt;/DIV&gt;
&lt;DIV&gt;format date_var date9.;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;After running this, the date_var variable has a missing value (a dot) for each observation.&amp;nbsp; What should I change in my code?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;God bless, best regards, and thanks so much,&lt;BR /&gt;Jadallah&lt;/DIV&gt;</description>
    <pubDate>Thu, 21 Sep 2017 01:27:43 GMT</pubDate>
    <dc:creator>jjadall1</dc:creator>
    <dc:date>2017-09-21T01:27:43Z</dc:date>
    <item>
      <title>Converting Character Date to Numeric Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397663#M96127</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello SAS Supoort Communities,&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;I would like to convert the additional_signature_date_1 variable in the attached SAS dataset from a character variable to a numeric variable (a numeric SAS date).&amp;nbsp; I used the following code:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV&gt;data audit.a2011p1;&lt;/DIV&gt;
&lt;DIV&gt;set audit.a2011p;&lt;/DIV&gt;
&lt;DIV&gt;date_var = input(additional_signature_&lt;WBR /&gt;date_1,date9.);&lt;/DIV&gt;
&lt;DIV&gt;format date_var date9.;&lt;/DIV&gt;
&lt;DIV&gt;run;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;After running this, the date_var variable has a missing value (a dot) for each observation.&amp;nbsp; What should I change in my code?&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;God bless, best regards, and thanks so much,&lt;BR /&gt;Jadallah&lt;/DIV&gt;</description>
      <pubDate>Thu, 21 Sep 2017 01:27:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397663#M96127</guid>
      <dc:creator>jjadall1</dc:creator>
      <dc:date>2017-09-21T01:27:43Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Character Date to Numeric Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397669#M96130</link>
      <description>&lt;P&gt;Looking at obs=14 for the variable&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;additional_signature_&lt;/SPAN&gt;&lt;SPAN&gt;date_1='8/25/2011' - This is NOT date9. informat but mmddyy10 informat. &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Try this....&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data audit.a2011p1;
set audit.a2011p;
date_var = input(additional_signature_date_1,mmddyy10.);
format date_var date9.;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;Always check your log, WARNING messages must be there or _ERROR_.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 01:56:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397669#M96130</guid>
      <dc:creator>ShiroAmada</dc:creator>
      <dc:date>2017-09-21T01:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Character Date to Numeric Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397670#M96131</link>
      <description>&lt;P&gt;I am not going to download a zip file. Can you post some of the values of the charcter variable? Make sure to check whether the values have leading spaces. &amp;nbsp;For example you could run this data step to print the first 10 non-missing values.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  set audit.a2011p;
  where not missing(additional_signature_date_1);
  put additional_signature_date_1 $quote. ;
  if _n_ &amp;gt;= 10 then stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 21 Sep 2017 01:57:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397670#M96131</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-09-21T01:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Character Date to Numeric Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397671#M96132</link>
      <description>&lt;P&gt;God bless you and your family! &amp;nbsp;Thank you so much! &amp;nbsp;I appreciate it! &amp;nbsp;It worked!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 02:05:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397671#M96132</guid>
      <dc:creator>jjadall1</dc:creator>
      <dc:date>2017-09-21T02:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: Converting Character Date to Numeric Date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397672#M96133</link>
      <description>&lt;P&gt;Amen PTLA (Praise The Lord Almighty).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have a blessed&amp;nbsp;day and coming weekend &amp;nbsp;&lt;A href="https://communities.sas.com/t5/user/viewprofilepage/user-id/3770" target="_self"&gt;&lt;SPAN class=""&gt;jjadall1&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Sep 2017 02:08:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Converting-Character-Date-to-Numeric-Date/m-p/397672#M96133</guid>
      <dc:creator>ShiroAmada</dc:creator>
      <dc:date>2017-09-21T02:08:58Z</dc:date>
    </item>
  </channel>
</rss>

