<?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: Convert SAS date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234129#M42789</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; encounterdate;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; fy14merge;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;dob1=input(dob,???&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;dob1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date10.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;THis is the code I am trying to use...but not sure what to put in the ??? if I am working with a SAS date (e.g. 19632)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 10 Nov 2015 22:10:23 GMT</pubDate>
    <dc:creator>jenim514</dc:creator>
    <dc:date>2015-11-10T22:10:23Z</dc:date>
    <item>
      <title>Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234126#M42787</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Changing date formats are so confusing!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I&amp;nbsp;would like help&amp;nbsp;changing a DOB format that is a SAS date, (e.g. 17673) to a meaningful date such as date10.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 21:59:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234126#M42787</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-10T21:59:59Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234127#M42788</link>
      <description>&lt;P&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt;date= 17673;&lt;BR /&gt;date1=put(date,date9.);&lt;BR /&gt;date2=date;&lt;BR /&gt;format date2 date9.;&lt;BR /&gt;put _all_;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234127#M42788</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-11-10T22:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234129#M42789</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; encounterdate;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; fy14merge;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;dob1=input(dob,???&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;);&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;format&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;dob1 &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;date10.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;THis is the code I am trying to use...but not sure what to put in the ??? if I am working with a SAS date (e.g. 19632)&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:10:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234129#M42789</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-10T22:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234133#M42791</link>
      <description>&lt;P&gt;data encounterdate; set fy14merge; dob1=input(dob,???); format dob1 date10.; run; THis is the code I am trying to use...but not sure what to put in the ??? if I am working with a SAS date (e.g. 19632)&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234133#M42791</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-10T22:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234135#M42792</link>
      <description>PUT() converts your date from a SAS DATE to a TEXT field.&lt;BR /&gt;Applying a format via the FORMAT statement changes how SAS displays the date, ie the underlying value is 19632, but it appears as 01Oct2013.  Keeping the date as a SAS date allows you to use all the date functions in SAS in the future, for example, MONTH(), YEAR() to extract portions of the date. As well as it will sort properly in time, whereas if it's a character variable it will sort alphabetically. &lt;BR /&gt;&lt;BR /&gt;Short version: Apply a format, don't use PUT() to convert.</description>
      <pubDate>Tue, 10 Nov 2015 22:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234135#M42792</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-10T22:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234137#M42793</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:25:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234137#M42793</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2015-11-10T22:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert SAS date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234138#M42794</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;

data encounterdate; 
set fy14merge; 
format dob date9.; 
run; &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Try the above. Also, please take the time to format your code properly. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;You don't need input unless the value is a character and it seems to be a number.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2015 22:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-SAS-date/m-p/234138#M42794</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-11-10T22:27:59Z</dc:date>
    </item>
  </channel>
</rss>

