<?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: Changing from numerical data to date using SAS ondemand in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564413#M158310</link>
    <description>&lt;P&gt;You're close &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Use the Best8. Format and the appropriate yymmdd8. Informat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    SurgStart=20140410;
    SurgDate=input(put(SurgStart, best8.), yymmdd8.);
    put SurgStart= SurgDate= date8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Jun 2019 09:25:48 GMT</pubDate>
    <dc:creator>PeterClemmensen</dc:creator>
    <dc:date>2019-06-07T09:25:48Z</dc:date>
    <item>
      <title>Changing from numerical data to date using SAS ondemand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564411#M158309</link>
      <description>&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;Hi,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;I'm using SAS on demand and I'm struggling to change a numeric variable to a SAS date.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;My numeric variable is SurgStart which has format best12. and informat best32. It contains 8 digits that represents YYYYMMDD&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;&amp;nbsp;&lt;SPAN style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; &amp;amp;amp;quot&amp;amp;quot;,serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; margin: 0px;"&gt;What I want to do is changed SurgStart e.g.&lt;/SPAN&gt;&lt;SPAN style="background-attachment: scroll; background-clip: border-box; background-color: #d6f0ff; background-image: none; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-repeat: repeat; background-size: auto; color: #0068a3; font-family: &amp;amp;quot; &amp;amp;amp;quot&amp;amp;quot;,serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; margin: 0px;"&gt;20140410&lt;/SPAN&gt;&lt;SPAN style="background-color: transparent; color: #333333; font-family: &amp;amp;quot; &amp;amp;amp;quot&amp;amp;quot;,serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; line-height: 16.8px; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; margin: 0px;"&gt; to become the date 2014 04 10 so I can then do time series analysis.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;My code is:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;data ab1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;set ab;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="&amp;quot;&amp;amp;quot&amp;quot;,serif"&gt;SurgDate&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;=input(put(SurgStart, best12.), yyyymmdd.);&lt;BR /&gt;format SurgDate date8.;&lt;BR /&gt;run;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;This doesn't work.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="margin: 0px; color: #333333; font-family: '&amp;amp;quot',serif; font-size: 10.5pt;"&gt;Please help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 09:02:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564411#M158309</guid>
      <dc:creator>nevennett</dc:creator>
      <dc:date>2019-06-07T09:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from numerical data to date using SAS ondemand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564413#M158310</link>
      <description>&lt;P&gt;You're close &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Use the Best8. Format and the appropriate yymmdd8. Informat&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
    SurgStart=20140410;
    SurgDate=input(put(SurgStart, best8.), yymmdd8.);
    put SurgStart= SurgDate= date8.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 09:25:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564413#M158310</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2019-06-07T09:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from numerical data to date using SAS ondemand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564414#M158311</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/228290"&gt;@nevennett&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Try this instead:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SurgDate=input(put(SurgStart, 8.), yymmdd8.);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 07 Jun 2019 09:25:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564414#M158311</guid>
      <dc:creator>ErikLund_Jensen</dc:creator>
      <dc:date>2019-06-07T09:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from numerical data to date using SAS ondemand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564416#M158312</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input Surgstart;&lt;BR /&gt;datalines;&lt;BR /&gt;20140410&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;SurgDate=Input( Put( Surgstart, 8.), Yymmdd10.);&lt;BR /&gt;format SurgDate Yymmdd10.;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 09:30:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564416#M158312</guid>
      <dc:creator>anushreebiotech</dc:creator>
      <dc:date>2019-06-07T09:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from numerical data to date using SAS ondemand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564432#M158321</link>
      <description>&lt;P&gt;or even&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;SurgDate=input(cats(SurgStart), yymmdd8.);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Jun 2019 11:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/564432#M158321</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-06-07T11:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Changing from numerical data to date using SAS ondemand</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/565489#M158782</link>
      <description>&lt;P&gt;Thanks everyone for answering my question. A combination of the responses seems to have done the trick:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data ab1;&lt;BR /&gt;set ab;&lt;BR /&gt;SurgDate=input(put(SurgStart, 8.),yymmdd8.);&lt;BR /&gt;format SurgDate yymmdd8.;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jun 2019 08:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Changing-from-numerical-data-to-date-using-SAS-ondemand/m-p/565489#M158782</guid>
      <dc:creator>nevennett</dc:creator>
      <dc:date>2019-06-12T08:54:26Z</dc:date>
    </item>
  </channel>
</rss>

