<?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: How to change 0001-01-01 as date format? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236879#M55282</link>
    <description>Not the missing value. I'm dealing with GCM data. The time format is the days after 0001-01-01. I want to check if the data I use are the coresponding date. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks</description>
    <pubDate>Mon, 30 Nov 2015 02:53:06 GMT</pubDate>
    <dc:creator>hua</dc:creator>
    <dc:date>2015-11-30T02:53:06Z</dc:date>
    <item>
      <title>How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236868#M55276</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I used the code:&lt;/P&gt;
&lt;P&gt;%let start_date=01Jan0001;&lt;BR /&gt;%let end_date=31Dec2013;&lt;BR /&gt;data Date;&lt;BR /&gt;do date="&amp;amp;start_date"d to "&amp;amp;end_date"d;&lt;BR /&gt;output;&lt;BR /&gt;end;&lt;BR /&gt;format date date9.;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data YMD;&lt;BR /&gt;set Date; &lt;BR /&gt;Year=year(date);&lt;BR /&gt;month=month(date);&lt;BR /&gt;day=day(date);&lt;BR /&gt;drop date;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But, SAS don't recognize the date before 1600-01-01.&lt;/P&gt;
&lt;P&gt;Does anyone know how to solve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 01:23:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236868#M55276</guid>
      <dc:creator>hua</dc:creator>
      <dc:date>2015-11-30T01:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236873#M55278</link>
      <description>&lt;P&gt;Why do you want to store invalid dates?&lt;/P&gt;
&lt;P&gt;Are you using them as some type of special missing value? &amp;nbsp;If so then pick a different date that can be stored in a SAS date variable.&lt;/P&gt;
&lt;P&gt;Otherwise just work with your dates as either strings or three separate year, month and day variables.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 02:06:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236873#M55278</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-11-30T02:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236876#M55281</link>
      <description>&lt;P&gt;It becomes very messy to deal with pre-18th century dates, before the adoption of our regular calendar. SAS will not do that for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p1wj0wt2ebe2a0n1lv4lem9hdc0v.htm" target="_self"&gt;About SAS Date, Time, and Datetime values&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you really need them, use year, month, day values and good luck&amp;nbsp;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 02:37:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236876#M55281</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-11-30T02:37:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236879#M55282</link>
      <description>Not the missing value. I'm dealing with GCM data. The time format is the days after 0001-01-01. I want to check if the data I use are the coresponding date. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Thanks</description>
      <pubDate>Mon, 30 Nov 2015 02:53:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236879#M55282</guid>
      <dc:creator>hua</dc:creator>
      <dc:date>2015-11-30T02:53:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236880#M55283</link>
      <description>Thanks. &lt;BR /&gt;Yes, SAS could only recognize the dates after 1600.&lt;BR /&gt;I did this in excel. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Mon, 30 Nov 2015 02:54:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236880#M55283</guid>
      <dc:creator>hua</dc:creator>
      <dc:date>2015-11-30T02:54:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236890#M55287</link>
      <description>&lt;P&gt;Not sure I'm clear on the exact issue you mentioned....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt; I want to check if the data I use are the coresponding date."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would you be able to elaborate with an example of the challenge you have?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 04:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236890#M55287</guid>
      <dc:creator>kannand</dc:creator>
      <dc:date>2015-11-30T04:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236893#M55288</link>
      <description>&lt;P&gt;This is what I would try. If the foreign date system considers 01-01-0001 as day zero then foreignDate-584388 should give you the corresponding SAS date. If 01-01-0001 is day one then that expression should be&amp;nbsp;&lt;SPAN&gt;foreignDate-&lt;/SPAN&gt;&lt;SPAN&gt;584389.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-584388 is '01JAN1600'd - '01JAN3200'd&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 04:55:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/236893#M55288</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2015-11-30T04:55:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to change 0001-01-01 as date format?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/237011#M55296</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/55231"&gt;@hua&lt;/a&gt; wrote:&lt;BR /&gt;Thanks. &lt;BR /&gt;Yes, SAS could only recognize the dates after 1600.&lt;BR /&gt;I did this in excel. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You need to double check what Excel may have done. It doesn't recognize dates by default before 1900, at least on my install. I suspect you ended up with a TEXT value in Excel not an actual date. See what happens if you change the cell format in Excell to display a different date format.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2015 16:48:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-to-change-0001-01-01-as-date-format/m-p/237011#M55296</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-11-30T16:48:46Z</dc:date>
    </item>
  </channel>
</rss>

