<?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: Date renderring in SAS in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1999#M879</link>
    <description>Thank you Peter.&lt;BR /&gt;
&lt;BR /&gt;
I totally agree with what you are saying about discarding days and months, and only considering years -- especially for times when months definitions were not the same as ours.&lt;BR /&gt;
We will either solve our problem of early dates with storing only years, or re-considering the matter with a "what exactly is your need" approach.&lt;BR /&gt;
&lt;BR /&gt;
Merry Christmas too.</description>
    <pubDate>Fri, 22 Dec 2006 10:16:31 GMT</pubDate>
    <dc:creator>Olivier</dc:creator>
    <dc:date>2006-12-22T10:16:31Z</dc:date>
    <item>
      <title>Date renderring in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1997#M877</link>
      <description>Hi everyone.&lt;BR /&gt;
&lt;BR /&gt;
We're looking for a great idea to store dates (and display them properly) more ancient than 1582. Currently, I face great difficulties to store such dates as january 1st, 1492 ; not to mention displaying them, or applying SAS date functions on them !&lt;BR /&gt;
&lt;BR /&gt;
Any hints welcome.&lt;BR /&gt;
Thanks in advance&lt;BR /&gt;
&lt;BR /&gt;
Olivier</description>
      <pubDate>Thu, 21 Dec 2006 10:51:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1997#M877</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2006-12-21T10:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Date renderring in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1998#M878</link>
      <description>ignore the problem that has caused SAS to stop at 1582 (the change of the calendar resulted in a "loss" of days) ! &lt;BR /&gt;
I don't think so!&lt;BR /&gt;
I'm not sure what months were called in earlier calendars, or whether "seasons" or "legal quarter dates" or "religous festivals" would be used to define "the time within a year". &lt;BR /&gt;
&lt;BR /&gt;
Have you some definition among your "input data" that would clarify what level of definition within an "early-year" you need ?&lt;BR /&gt;
&lt;BR /&gt;
If only the year number is needed, then don't worry about SAS date standards ~ just use the year as a number.&lt;BR /&gt;
&lt;BR /&gt;
Hope these ideas prove helpful and the questions lead to a better definition of the shape of your solution.&lt;BR /&gt;
&lt;BR /&gt;
Merry Christmas,&lt;BR /&gt;
Peter</description>
      <pubDate>Fri, 22 Dec 2006 09:09:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1998#M878</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-12-22T09:09:19Z</dc:date>
    </item>
    <item>
      <title>Re: Date renderring in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1999#M879</link>
      <description>Thank you Peter.&lt;BR /&gt;
&lt;BR /&gt;
I totally agree with what you are saying about discarding days and months, and only considering years -- especially for times when months definitions were not the same as ours.&lt;BR /&gt;
We will either solve our problem of early dates with storing only years, or re-considering the matter with a "what exactly is your need" approach.&lt;BR /&gt;
&lt;BR /&gt;
Merry Christmas too.</description>
      <pubDate>Fri, 22 Dec 2006 10:16:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/1999#M879</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2006-12-22T10:16:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date renderring in SAS</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/2000#M880</link>
      <description>if you make a decision that "early years" are just the year number, you might want a user format that uses ranges. Here's a demo demonstrating why you might want to avoid using integer years [PRE]&lt;BR /&gt;
proc format ;&lt;BR /&gt;
  picture older_ds /* handling older dates than SAS */&lt;BR /&gt;
    "1jan1582"d - &amp;lt;0  = [date9.]&lt;BR /&gt;
     0 - 1581         = '1234'( prefix='old~' )&lt;BR /&gt;
         1582 - "31dec9999"d = [date9.]&lt;BR /&gt;
       ;&lt;BR /&gt;
 %put &amp;gt;&amp;gt;%sysfunc( putn( 1234, older_ds ))&amp;lt;&amp;lt;;   &lt;BR /&gt;
data demo;&lt;BR /&gt;
  do date = 1581, &lt;BR /&gt;
       "1jan1582"d to "1jan1960"d by 35000, &lt;BR /&gt;
       "1jan1870"d to "1jan1960"d by 7000, &lt;BR /&gt;
       "1jan1950"d to "1jan1960"d by 700, &lt;BR /&gt;
                -5 to 10, &lt;BR /&gt;
              1066, 1284, 1413, &lt;BR /&gt;
              1580 to 1590;&lt;BR /&gt;
     put date date= older_ds. ;&lt;BR /&gt;
     output ;&lt;BR /&gt;
  end;&lt;BR /&gt;
run; [/PRE]&lt;BR /&gt;
&lt;BR /&gt;
treating date values zero to 1581 as a year number loses regular SAS dates 1jan60 - 30Apr64 as old~years. &lt;BR /&gt;
&lt;BR /&gt;
Using a suitable picture modifier multiplier would allow old~years to be placed above or below the valid SAS date number range .&lt;BR /&gt;
&lt;BR /&gt;
Here's the picture for placing early~years above the valid sas date range with multiplier 1e-7. 10660000000 ( or 1066e7) is displayed as o:yr1066. Old~year date arithmetic is supported by doing the same as the picture "multiplier=" modifier, that is:  dividing by 1e7  [PRE]&lt;BR /&gt;
proc format ;&lt;BR /&gt;
  picture older_ds /* handling older dates than SAS */&lt;BR /&gt;
   1e7 - 1581e7       = '1234'( prefix='o:yr' mult= 1e-7 )&lt;BR /&gt;
         1582e7 -high = '1234'( prefix='2high' mult= 1e-7 )&lt;BR /&gt;
         other  = [date9.] &lt;BR /&gt;
      ;&lt;BR /&gt;
run;&lt;BR /&gt;
data demo;&lt;BR /&gt;
  do date = 1581, &lt;BR /&gt;
       "1jan1582"d to "1jan1960"d by 35000, &lt;BR /&gt;
       "1jan1950"d to "1jan1960"d by 700, &lt;BR /&gt;
              1066e7, 1284e7, 1413e7, &lt;BR /&gt;
              1580e7 to 1584e7  by 1e7,&lt;BR /&gt;
              1e7  to 10000010,&lt;BR /&gt;
         19999996  to 20000004,&lt;BR /&gt;
          2e7      to 1582e7 by (1e7*33)  &lt;BR /&gt;
    ;&lt;BR /&gt;
     put date date= older_ds. ;&lt;BR /&gt;
     output ;&lt;BR /&gt;
  end;&lt;BR /&gt;
run; [/PRE]&lt;BR /&gt;
as you can see, an old~year constant would appear as&lt;BR /&gt;
   1066e7&lt;BR /&gt;
&lt;BR /&gt;
Given that SAS integers in standard 8byte numerics are precise to 16 or 17 digits, a 4 digit year and 7-zeros suffix are supported "precisely" .&lt;BR /&gt;
&lt;BR /&gt;
What's the application that wants to use such history ?&lt;BR /&gt;
&lt;BR /&gt;
Peter</description>
      <pubDate>Fri, 22 Dec 2006 11:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Date-renderring-in-SAS/m-p/2000#M880</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-12-22T11:47:43Z</dc:date>
    </item>
  </channel>
</rss>

