<?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: convertion to sas dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233102#M42542</link>
    <description>&lt;P&gt;It appears that your data variable 'd' is already in a numeric SAS date. Run the CONTENTS procedure to see if a permanent format is already assigned to variable 'd'. If so, then the actual date will show on the printed output but the underlying data is still the numeric SAS date, i.e. the number of days since January 1, 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log note simply documents that INPUT function performed numeric to character conversion.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Nov 2015 15:49:02 GMT</pubDate>
    <dc:creator>MaikH_Schutze</dc:creator>
    <dc:date>2015-11-04T15:49:02Z</dc:date>
    <item>
      <title>convertion to sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233099#M42541</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I want to convert the date value in the 'd' variable in the sas dataset 'final' such as 10/21/2012 to a sas date value and create a new variable 'd1' for it. The 'd' variable is numeric. I used the code below and it did convert the mmddyy10. formatted values to a sas value but only for the year 2012. Dates with values in the 2011 year such as 10/12/2011 were not converted. I am not able to understand this. In addition I also got the 'note' stated below in the log. Please advice. I need to find the most recent date value and coverting into sas date values will make ti easier.&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;dr&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data temp (keep= d d1);&lt;BR /&gt;17&amp;nbsp;&amp;nbsp;&amp;nbsp; set final;&lt;BR /&gt;18&amp;nbsp;&amp;nbsp; d1=input(d,anydtdte15.);&lt;BR /&gt;19&amp;nbsp;&amp;nbsp; run;&lt;BR /&gt;&lt;BR /&gt;NOTE: Numeric values have been converted to character values at the places given by:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Line):(Column).&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 18:13&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 15:40:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233099#M42541</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2015-11-04T15:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: convertion to sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233102#M42542</link>
      <description>&lt;P&gt;It appears that your data variable 'd' is already in a numeric SAS date. Run the CONTENTS procedure to see if a permanent format is already assigned to variable 'd'. If so, then the actual date will show on the printed output but the underlying data is still the numeric SAS date, i.e. the number of days since January 1, 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The log note simply documents that INPUT function performed numeric to character conversion.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 15:49:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233102#M42542</guid>
      <dc:creator>MaikH_Schutze</dc:creator>
      <dc:date>2015-11-04T15:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: convertion to sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233104#M42543</link>
      <description>&lt;P&gt;Hi mate,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you post your code as an example to work on it ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 15:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233104#M42543</guid>
      <dc:creator>DartRodrigo</dc:creator>
      <dc:date>2015-11-04T15:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: convertion to sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233108#M42544</link>
      <description>&lt;P&gt;The original post already includes the code. Upon re-reading, he does say the date variable is already associated with the SAS date format mmddyy10., therefore, the raw data is already a standard SAS date number. If you'd rather have the number than remove the format using this type of code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;FONT face="Courier New" size="3"&gt;&lt;CODE class=" language-sas"&gt;data final_2;
   set final;
   format d;
run;
&lt;/CODE&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The FORMAT statement without a format will remove a previously assigned format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000178212.htm" target="_blank"&gt;https://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000178212.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 16:10:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233108#M42544</guid>
      <dc:creator>MaikH_Schutze</dc:creator>
      <dc:date>2015-11-04T16:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: convertion to sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233115#M42546</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4809"&gt;@MaikH_Schutze﻿&lt;/a&gt;. Yes, it did have a permanent format and I removed it.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 16:48:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233115#M42546</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2015-11-04T16:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: convertion to sas dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233116#M42547</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4809"&gt;@MaikH_Schutze﻿&lt;/a&gt; for the link. I did remove the format and it worked.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2015 16:49:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/convertion-to-sas-dates/m-p/233116#M42547</guid>
      <dc:creator>dr2014</dc:creator>
      <dc:date>2015-11-04T16:49:57Z</dc:date>
    </item>
  </channel>
</rss>

