<?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: Numeric days to a date format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472976#M121318</link>
    <description>&lt;P&gt;Yes, sorry for making my question unclear. I'm surprised because these are supposed to be dates for the start date of clinical trials in the past. I'm not supposed to have future dates. And I wonder how come?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="date.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21376iC76BDF950EEBA2F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="date.png" alt="date.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jun 2018 13:11:27 GMT</pubDate>
    <dc:creator>Cruise</dc:creator>
    <dc:date>2018-06-25T13:11:27Z</dc:date>
    <item>
      <title>Numeric days to a date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472938#M121308</link>
      <description>&lt;P&gt;I'd like to do a quick check If I'm missing something obvious here? Output from below is a future date 09/02/2076. Any idea why?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; p.a;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;a=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;42614&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;format&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; a &lt;/FONT&gt;&lt;FONT color="#008080" face="Courier New"&gt;mmddyy10.&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Courier New"&gt;Thanks a lot. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 11:46:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472938#M121308</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-06-25T11:46:36Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric days to a date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472941#M121309</link>
      <description>&lt;P&gt;From the documentation:&lt;/P&gt;
&lt;P&gt;"A SAS date value is a value that represents the number of days between January 1, 1960, and a specified date. SAS can perform calculations on dates ranging from A.D. 1582 to A.D. 19,900. Dates before January 1, 1960, are negative numbers; dates after are positive numbers."&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 11:54:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472941#M121309</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-06-25T11:54:59Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric days to a date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472943#M121310</link>
      <description>&lt;P&gt;A date value in SAS is the count of days starting at 1960-01-01 (days before that have a negative value). If you count 42614 days from that, you arrive at that date in 2076. Today's date is 21360 as a raw numerical value:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x1 = today();
put x1=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 25 Jun 2018 11:57:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472943#M121310</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-25T11:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric days to a date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472976#M121318</link>
      <description>&lt;P&gt;Yes, sorry for making my question unclear. I'm surprised because these are supposed to be dates for the start date of clinical trials in the past. I'm not supposed to have future dates. And I wonder how come?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="date.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21376iC76BDF950EEBA2F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="date.png" alt="date.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 13:11:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472976#M121318</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2018-06-25T13:11:27Z</dc:date>
    </item>
    <item>
      <title>Re: Numeric days to a date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472978#M121320</link>
      <description>&lt;P&gt;Oh. This looks like data imported from MS Excel. If somehow the fact that a date is concerned gets missed during the import from Excel to SAS, raw Excel dates will look like this, as Excel counts days from 1899-12-31. See this for reference:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
x1 = 44227;
diff = '01jan1960'd - '30dec1899'd;
x1 = x1 - diff;
format x1 yymmddd10.;
put x1=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Edit: corrected Excel basedate to 1899-12-30 (1960-01-01 in SAS is 0, 1900-01-01 in Excel is 1, but because of the "leapyear 1900" bug in Excel it actually has to be 2)&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jun 2018 13:22:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Numeric-days-to-a-date-format/m-p/472978#M121320</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-25T13:22:27Z</dc:date>
    </item>
  </channel>
</rss>

