<?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: Dates Stored as Numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691312#M210378</link>
    <description>&lt;P&gt;Interesting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would try informat ANYDTDTE10. instead of MMDDYY8., but I'm not sure that's it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would next try coding an INFILE and trying first a MISSOVER and second a TRUNCOVER parameter on the INFILE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
    <pubDate>Tue, 13 Oct 2020 15:36:25 GMT</pubDate>
    <dc:creator>jimbarbour</dc:creator>
    <dc:date>2020-10-13T15:36:25Z</dc:date>
    <item>
      <title>Dates Stored as Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691310#M210376</link>
      <description>&lt;P&gt;Hi, I'm attaching my code. I'm not sure what else to add, but the last date 8/2/20 will not print out as a number in my results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Use list style of input read in the above data such that the&lt;BR /&gt;dates are stored as numbers(SAS dates). Print&lt;BR /&gt;the resulting data set without formatting it*/&lt;BR /&gt;Data Power;&lt;BR /&gt;Length Brand $5 ;&lt;BR /&gt;Input Brand $&lt;BR /&gt;Install :DATE9.&lt;BR /&gt;Replace :MMDDYY8. ; /*dates are stored as numbers*/&lt;BR /&gt;/*list style of input but do not format*/&lt;BR /&gt;datalines;&lt;BR /&gt;Zap 13MAR2019 12/20/19&lt;BR /&gt;Jolt 29FEB2020 9/29/20&lt;BR /&gt;Shock 25MAR2020 8/2/20&lt;BR /&gt;;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=Power;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my results:&lt;/P&gt;&lt;P&gt;Brand&amp;nbsp; &amp;nbsp;Install&amp;nbsp; &amp;nbsp;Replace&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Zap&lt;/TD&gt;&lt;TD&gt;21621&lt;/TD&gt;&lt;TD&gt;21903&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jolt&lt;/TD&gt;&lt;TD&gt;21974&lt;/TD&gt;&lt;TD&gt;22187&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Shock&lt;/TD&gt;&lt;TD&gt;21999&lt;/TD&gt;&lt;TD&gt;.&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do I get observation 3 under replace to print?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:30:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691310#M210376</guid>
      <dc:creator>sb1062204</dc:creator>
      <dc:date>2020-10-13T15:30:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dates Stored as Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691312#M210378</link>
      <description>&lt;P&gt;Interesting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would try informat ANYDTDTE10. instead of MMDDYY8., but I'm not sure that's it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would next try coding an INFILE and trying first a MISSOVER and second a TRUNCOVER parameter on the INFILE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:36:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691312#M210378</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-13T15:36:25Z</dc:date>
    </item>
    <item>
      <title>Re: Dates Stored as Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691314#M210379</link>
      <description>&lt;P&gt;Oh, and the reason I say "interesting" is because when I paste your code into Enterprise Guide, it runs just fine.&amp;nbsp; Are you using SAS Studio (Univ Edition is one form of SAS Studio)?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1602603797479.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50631iE230D759624F6FB2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jimbarbour_0-1602603797479.png" alt="jimbarbour_0-1602603797479.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Make sure your datalines are all hard up against the &lt;EM&gt;left&lt;/EM&gt; margin.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For any future posts of code or log files, please use the buttons on the reply window.&amp;nbsp; It really makes it easier for us to see what's going on.&lt;/P&gt;
&lt;DIV id="tinyMceEditorjimbarbour_1" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jimbarbour_0-1602603718187.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/50630iA77BA02A376CF34F/image-size/large?v=v2&amp;amp;px=999" role="button" title="jimbarbour_0-1602603718187.png" alt="jimbarbour_0-1602603718187.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:43:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691314#M210379</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-13T15:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Dates Stored as Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691317#M210380</link>
      <description>&lt;P&gt;The code you posted, at least as shown, runs and gets a valid date for me for the 8/2/20 value.&lt;/P&gt;
&lt;P&gt;If you are actually reading from an external file and having this issue then copy the lines from that file and paste into a code box opened on the forum using the &amp;lt;/&amp;gt; icon to preserve formatting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or check your source code for other characters that the message window on the forum may have reformatted so that the code shown is not what you actually have.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:44:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691317#M210380</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-10-13T15:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: Dates Stored as Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691324#M210384</link>
      <description>The spacing in the datalines was off, thank you so much for your help</description>
      <pubDate>Tue, 13 Oct 2020 15:52:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691324#M210384</guid>
      <dc:creator>sb1062204</dc:creator>
      <dc:date>2020-10-13T15:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dates Stored as Numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691325#M210385</link>
      <description>&lt;P&gt;I have a secret way of knowing these things (I've done it too).&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Glad it worked out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 15:54:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Dates-Stored-as-Numbers/m-p/691325#M210385</guid>
      <dc:creator>jimbarbour</dc:creator>
      <dc:date>2020-10-13T15:54:31Z</dc:date>
    </item>
  </channel>
</rss>

