<?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: Error for date in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306522#M65538</link>
    <description>&lt;P&gt;You need to use the colon modifier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The : (colon) format modifier enables you to use list input but also to specify an informat after a variable name, whether character or numeric. SAS reads until it encounters a blank column, the defined length of the variable (character only), or the end of the data line, whichever comes first.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#n1w749t788cgi2n1txpuccsuqtro.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#n1w749t788cgi2n1txpuccsuqtro.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test.Merge_test_1;
  input Id startdate :date9. enddate :date9. Value1;
  datalines;
120 01JAN2000 01JAN2000 13
120 01JAN2000 01FEB2000 13
120 01FEB2000 01APR2000 15
120 01APR2000 01MAY2000 19
120 01MAY2000 01Dec2000 5
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 22 Oct 2016 05:16:58 GMT</pubDate>
    <dc:creator>Patrick</dc:creator>
    <dc:date>2016-10-22T05:16:58Z</dc:date>
    <item>
      <title>Error for date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306518#M65536</link>
      <description>&lt;P&gt;I think I am asking very basic question but I could not find any reason why this error is happening.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was making simple data set to understand how merge works. Then for the code below, I got an error massage saying invalid data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test.Merge_test_1;&lt;BR /&gt;input Id startdate date9. enddate date9. Value1;&lt;BR /&gt;datalines;&lt;BR /&gt;120 01JAN2000 01JAN2000 13&lt;BR /&gt;120 01JAN2000 01FEB2000 13&lt;BR /&gt;120 01FEB2000 01APR2000 15&lt;BR /&gt;120 01APR2000 01MAY2000 19&lt;BR /&gt;120 01MAY2000 01Dec2000 5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SAS tells me that there's problem with variable enddate, but since startdate data is working fine, I cannot understand what is wrong with this code. Just in case it might help, I am putting log as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;183 data test.Merge_test_1;&lt;BR /&gt;184 input Id startdate date9. enddate date9. Value1;&lt;BR /&gt;185 datalines;&lt;/P&gt;&lt;P&gt;NOTE: Invalid data for enddate in line 186 14-22.&lt;BR /&gt;RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+&lt;BR /&gt;186 120 01JAN2000 01JAN2000 13&lt;BR /&gt;Id=120 startdate=14610 enddate=. Value1=0 _ERROR_=1 _N_=1&lt;BR /&gt;NOTE: Invalid data for enddate in line 187 14-22.&lt;BR /&gt;187 120 01JAN2000 01FEB2000 13&lt;BR /&gt;Id=120 startdate=14610 enddate=. Value1=0 _ERROR_=1 _N_=2&lt;BR /&gt;NOTE: Invalid data for enddate in line 188 14-22.&lt;BR /&gt;188 120 01FEB2000 01APR2000 15&lt;BR /&gt;Id=120 startdate=14641 enddate=. Value1=0 _ERROR_=1 _N_=3&lt;BR /&gt;NOTE: Invalid data for enddate in line 189 14-22.&lt;BR /&gt;189 120 01APR2000 01MAY2000 19&lt;BR /&gt;Id=120 startdate=14701 enddate=. Value1=0 _ERROR_=1 _N_=4&lt;BR /&gt;NOTE: Invalid data for enddate in line 190 14-22.&lt;BR /&gt;190 120 01MAY2000 01Dec2000 5&lt;BR /&gt;Id=120 startdate=14731 enddate=. Value1=0 _ERROR_=1 _N_=5&lt;BR /&gt;NOTE: The data set TEST.MERGE_TEST_1 has 5 observations and 4 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.03 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would really appreciate if you can tell me the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Oct 2016 04:56:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306518#M65536</guid>
      <dc:creator>Leon_Seungmin</dc:creator>
      <dc:date>2016-10-22T04:56:18Z</dc:date>
    </item>
    <item>
      <title>Re: Error for date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306522#M65538</link>
      <description>&lt;P&gt;You need to use the colon modifier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The : (colon) format modifier enables you to use list input but also to specify an informat after a variable name, whether character or numeric. SAS reads until it encounters a blank column, the defined length of the variable (character only), or the end of the data line, whichever comes first.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#n1w749t788cgi2n1txpuccsuqtro.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/68089/HTML/default/viewer.htm#n1w749t788cgi2n1txpuccsuqtro.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test.Merge_test_1;
  input Id startdate :date9. enddate :date9. Value1;
  datalines;
120 01JAN2000 01JAN2000 13
120 01JAN2000 01FEB2000 13
120 01FEB2000 01APR2000 15
120 01APR2000 01MAY2000 19
120 01MAY2000 01Dec2000 5
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 22 Oct 2016 05:16:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306522#M65538</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2016-10-22T05:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: Error for date</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306525#M65539</link>
      <description>Thank you very much for your help as well as the link! It was very helpful.</description>
      <pubDate>Sat, 22 Oct 2016 05:34:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Error-for-date/m-p/306525#M65539</guid>
      <dc:creator>Leon_Seungmin</dc:creator>
      <dc:date>2016-10-22T05:34:17Z</dc:date>
    </item>
  </channel>
</rss>

