<?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: Proc format in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Proc-format/m-p/4621#M385</link>
    <description>Hi:&lt;BR /&gt;
  I am confused by your format and what it is that you want to do. SAS dates represent the number of days that have elapsed since Jan 1, 1960 -- which is the date stored as the number 0 in SAS. So, for example the following 3 dates are stored as the numbers shown next to them:&lt;BR /&gt;
[pre]&lt;BR /&gt;
date            date stored as number&lt;BR /&gt;
------------  ------------------------&lt;BR /&gt;
Jan  1, 1959      -365&lt;BR /&gt;
Jan  1, 1960        0&lt;BR /&gt;
Dec 31, 1961       730&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Therefore, the date Jan 2, 1960 would be internally stored as the number 1; and the date Jan 3, 1960 as the number 2, etc, etc.&lt;BR /&gt;
 &lt;BR /&gt;
Then, you could FORMAT the internally stored number with one of the date formats supplied by SAS or with a picture format that you designed yourself. So, for example, the table below shows how each format would be used to display the internal number (with some other numbers added):&lt;BR /&gt;
[pre]&lt;BR /&gt;
date stored   &lt;BR /&gt;
as number           date9.    mmddyy10.&lt;BR /&gt;
---------------  ---------- ----------&lt;BR /&gt;
 -3334           15NOV1950  11/15/1950&lt;BR /&gt;
  -365           01JAN1959  01/01/1959&lt;BR /&gt;
    0            01JAN1960  01/01/1960&lt;BR /&gt;
   730           31DEC1961  12/31/1961&lt;BR /&gt;
  2495           31OCT1966  10/31/1966&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
However, using a FORMAT does not change the internally stored number. It only changes how the number LOOKS on reports and graphs.&lt;BR /&gt;
&lt;BR /&gt;
It seems as though the variable you are trying to format might not be a SAS date value -- since the number 1 as a SAS date value would represent Jan 2, 1960 -- NOT 09/03/2007. In addition, you have a character value on the left hand side of the = sign in the format, which would normally mean that you were designing a character format. However, your VALUE statement shows a name for a numeric format.&lt;BR /&gt;
 &lt;BR /&gt;
You might consider contacting Tech Support for help with your question. They can review your program code and your data and help you achieve your desired results. To find out how to contact Tech Support, refer to this site:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/contact/index.html" target="_blank"&gt;http://support.sas.com/techsup/contact/index.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
    <pubDate>Mon, 10 Sep 2007 04:46:07 GMT</pubDate>
    <dc:creator>Cynthia_sas</dc:creator>
    <dc:date>2007-09-10T04:46:07Z</dc:date>
    <item>
      <title>Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Proc-format/m-p/4620#M384</link>
      <description>I need to format dates. for eg;&lt;BR /&gt;
proc format;&lt;BR /&gt;
value dates;&lt;BR /&gt;
'1'=day0+ -3&lt;BR /&gt;
'2'=day 2 + - 7&lt;BR /&gt;
so on..&lt;BR /&gt;
How can return a complete value like&lt;BR /&gt;
day0+ - 3 should give me 09/03/07 in the result.&lt;BR /&gt;
Also is there a way to insert the +- symbol instead of typing + and _ seperately.&lt;BR /&gt;
&lt;BR /&gt;
Thanks,&lt;BR /&gt;
Aps</description>
      <pubDate>Sun, 09 Sep 2007 20:25:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Proc-format/m-p/4620#M384</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-09T20:25:58Z</dc:date>
    </item>
    <item>
      <title>Re: Proc format</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Proc-format/m-p/4621#M385</link>
      <description>Hi:&lt;BR /&gt;
  I am confused by your format and what it is that you want to do. SAS dates represent the number of days that have elapsed since Jan 1, 1960 -- which is the date stored as the number 0 in SAS. So, for example the following 3 dates are stored as the numbers shown next to them:&lt;BR /&gt;
[pre]&lt;BR /&gt;
date            date stored as number&lt;BR /&gt;
------------  ------------------------&lt;BR /&gt;
Jan  1, 1959      -365&lt;BR /&gt;
Jan  1, 1960        0&lt;BR /&gt;
Dec 31, 1961       730&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
Therefore, the date Jan 2, 1960 would be internally stored as the number 1; and the date Jan 3, 1960 as the number 2, etc, etc.&lt;BR /&gt;
 &lt;BR /&gt;
Then, you could FORMAT the internally stored number with one of the date formats supplied by SAS or with a picture format that you designed yourself. So, for example, the table below shows how each format would be used to display the internal number (with some other numbers added):&lt;BR /&gt;
[pre]&lt;BR /&gt;
date stored   &lt;BR /&gt;
as number           date9.    mmddyy10.&lt;BR /&gt;
---------------  ---------- ----------&lt;BR /&gt;
 -3334           15NOV1950  11/15/1950&lt;BR /&gt;
  -365           01JAN1959  01/01/1959&lt;BR /&gt;
    0            01JAN1960  01/01/1960&lt;BR /&gt;
   730           31DEC1961  12/31/1961&lt;BR /&gt;
  2495           31OCT1966  10/31/1966&lt;BR /&gt;
&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
However, using a FORMAT does not change the internally stored number. It only changes how the number LOOKS on reports and graphs.&lt;BR /&gt;
&lt;BR /&gt;
It seems as though the variable you are trying to format might not be a SAS date value -- since the number 1 as a SAS date value would represent Jan 2, 1960 -- NOT 09/03/2007. In addition, you have a character value on the left hand side of the = sign in the format, which would normally mean that you were designing a character format. However, your VALUE statement shows a name for a numeric format.&lt;BR /&gt;
 &lt;BR /&gt;
You might consider contacting Tech Support for help with your question. They can review your program code and your data and help you achieve your desired results. To find out how to contact Tech Support, refer to this site:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/contact/index.html" target="_blank"&gt;http://support.sas.com/techsup/contact/index.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 10 Sep 2007 04:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Proc-format/m-p/4621#M385</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-10T04:46:07Z</dc:date>
    </item>
  </channel>
</rss>

