<?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 dates in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571949#M161373</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Why field var1&amp;nbsp; is numeric and not a sas date?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a; 
infile cards;  
input var1 mmddyy10.;
cards; 
01/23/1963 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jul 2019 03:54:02 GMT</pubDate>
    <dc:creator>Ronein</dc:creator>
    <dc:date>2019-07-09T03:54:02Z</dc:date>
    <item>
      <title>dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571949#M161373</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Why field var1&amp;nbsp; is numeric and not a sas date?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a; 
infile cards;  
input var1 mmddyy10.;
cards; 
01/23/1963 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 03:54:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571949#M161373</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-07-09T03:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571950#M161374</link>
      <description>&lt;P&gt;SAS dates are numeric. They are the number of days since 01/01/1960. Add a date format to your variable to see it as a date:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;format var1 yymmdd10.;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 04:06:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571950#M161374</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-07-09T04:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571951#M161375</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159549"&gt;@Ronein&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;Why field var1&amp;nbsp; is numeric and not a sas date?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a; 
infile cards;  
input var1 mmddyy10.;
cards; 
01/23/1963 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;VAR1 will be a date. It will be the number days since 1960. But since you didn't attach any format it will be confusing to humans, but not to SAS.&amp;nbsp; If you want to make it looks like a date to a human then attach a date format. Like DATE9. or YYMMDD10.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 04:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571951#M161375</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-07-09T04:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571952#M161376</link>
      <description>&lt;P&gt;SAS dates are numeric, but most of the time they have a format. So, it is correct.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
	infile cards;
	format var1 yymmdd10.;
	input var1 mmddyy10.;
	cards;
01/23/1963 
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, you are using an informat, to tell SAS how to translate the text "&lt;CODE class=" language-sas"&gt;01/23/1963&lt;/CODE&gt;". Then SAS saves it as the number of days between that date and 1st of January 1960. Then, if you want to, you can add an "outformat" to make it more readable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Most software solutions saves dates in this way, but the start date is often different. Microsoft Excel use 1st of January 2000 (or 1900) as a start date.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 04:12:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571952#M161376</guid>
      <dc:creator>heffo</dc:creator>
      <dc:date>2019-07-09T04:12:01Z</dc:date>
    </item>
    <item>
      <title>Re: dates</title>
      <link>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571956#M161380</link>
      <description>&lt;P&gt;Once again, follow Maxim 1: Read the Documentation, in this case&amp;nbsp;&lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.3&amp;amp;docsetId=lrcon&amp;amp;docsetTarget=p1wj0wt2ebe2a0n1lv4lem9hdc0v.htm&amp;amp;locale=en" target="_blank" rel="noopener"&gt;About SAS Date, Time, and Datetime Values&lt;/A&gt;, which is found in the Learning SAS Programming section under Concepts.&lt;/P&gt;
&lt;P&gt;You will find that SAS dates are indeed numeric.&lt;/P&gt;
&lt;P&gt;Given the number of your accumulated questions and posts, I am quite sure this has been covered already.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2019 05:41:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/dates/m-p/571956#M161380</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-09T05:41:37Z</dc:date>
    </item>
  </channel>
</rss>

