<?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 data in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472770#M121251</link>
    <description>&lt;P&gt;SAS does not automatically recognize a date (or a time value) as such, so you need to give it an informat:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data  example2;
input
  ID
  Loan_ID
  Sum_Loan
  Interest
  date_Loan :ddmmyy10.
;
format date ddmmyy10.;
cards;
1 1 100 2.4 01/06/2018
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sun, 24 Jun 2018 10:36:56 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-06-24T10:36:56Z</dc:date>
    <item>
      <title>Date data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472767#M121250</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;In Example1 &amp;nbsp;I enter a date data as a character&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data Example1;&lt;BR /&gt;input ID 1&lt;BR /&gt;Loan_ID 3&lt;BR /&gt;Sum_Loan 5-7&lt;BR /&gt;Interest 9-11&lt;BR /&gt;date_Loan $ 13-22 ;&lt;BR /&gt;Cards;&lt;BR /&gt;1 1 100 2.4 01/06/2018&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Example2 &amp;nbsp;I am trying to enter a date data as sas numeric and I get empty values.Why????&lt;/P&gt;&lt;P&gt;Data &amp;nbsp;&lt;SPAN&gt;Example2&lt;/SPAN&gt;;&lt;BR /&gt;input ID 1&lt;BR /&gt;Loan_ID 3&lt;BR /&gt;Sum_Loan 5-7&lt;BR /&gt;Interest 9-11&lt;BR /&gt;date_Loan 13-22 ;&lt;BR /&gt;Cards;&lt;BR /&gt;1 1 100 2.4 01/06/2018&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jun 2018 09:57:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472767#M121250</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2018-06-24T09:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Date data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472770#M121251</link>
      <description>&lt;P&gt;SAS does not automatically recognize a date (or a time value) as such, so you need to give it an informat:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data  example2;
input
  ID
  Loan_ID
  Sum_Loan
  Interest
  date_Loan :ddmmyy10.
;
format date ddmmyy10.;
cards;
1 1 100 2.4 01/06/2018
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 24 Jun 2018 10:36:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472770#M121251</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-06-24T10:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Date data</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472837#M121280</link>
      <description>&lt;P&gt;If you want SAS to read '01/06/2018' as the first of june 2018 then use the DDMMYY informat. If instead you want it to treat that as the sixth of January then use the MMDDYY informat.&amp;nbsp; Either way make sure to attach a format so that SAS doesn't display the date as the raw number of days since the beginning of 1960.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Example1;
  input
    ID 1
    Loan_ID 3
    Sum_Loan 5-7
    Interest 9-11
    @13 date_mdy mmddyy10.
    @13 date_dmy ddmmyy10.
  ;
  format date: date9. ;
cards;
1 1 100 2.4 01/06/2018
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In future it might be best to store your date strings in either Year, Month, Day order or use SAS's DATE format and avoid the confusion.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 421px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/21360iEE978E9A56F208B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jun 2018 23:19:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Date-data/m-p/472837#M121280</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-06-24T23:19:52Z</dc:date>
    </item>
  </channel>
</rss>

