<?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 Invalid date format in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677445#M204356</link>
    <description>&lt;P&gt;Keep getting an error "ERROR: Invalid date/time/datetime constant '01ju12020'd." The code used is below. I've used it multiple times in the past, but for some reason the error is only with " '01jul2020'd ". Suddenly only having this issue with the month of July.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I verified that the data is accurately formatted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
SELECT identification_number AS Product, 
consumer_account_number AS Loan, 
dateofaccountinformation AS DOAI, 
dateoflastpayment AS DOLP, 
actualpaymentamount FROM work.july2020
WHERE dateofaccountinformation BETWEEN '01ju12020'd AND '31jul2020'd AND dateoflastpayment BETWEEN '01ju12020'd AND '31jul2020'd AND actualpaymentamount = 000000000;
QUIT;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 18 Aug 2020 11:55:03 GMT</pubDate>
    <dc:creator>Nick9123</dc:creator>
    <dc:date>2020-08-18T11:55:03Z</dc:date>
    <item>
      <title>Invalid date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677445#M204356</link>
      <description>&lt;P&gt;Keep getting an error "ERROR: Invalid date/time/datetime constant '01ju12020'd." The code used is below. I've used it multiple times in the past, but for some reason the error is only with " '01jul2020'd ". Suddenly only having this issue with the month of July.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I verified that the data is accurately formatted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;PROC SQL;
SELECT identification_number AS Product, 
consumer_account_number AS Loan, 
dateofaccountinformation AS DOAI, 
dateoflastpayment AS DOLP, 
actualpaymentamount FROM work.july2020
WHERE dateofaccountinformation BETWEEN '01ju12020'd AND '31jul2020'd AND dateoflastpayment BETWEEN '01ju12020'd AND '31jul2020'd AND actualpaymentamount = 000000000;
QUIT;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 18 Aug 2020 11:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677445#M204356</guid>
      <dc:creator>Nick9123</dc:creator>
      <dc:date>2020-08-18T11:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677446#M204357</link>
      <description>Nevermind, just realized the issue was the " l " in jul was actually a 1. I will hang my head in shame.</description>
      <pubDate>Tue, 18 Aug 2020 12:04:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677446#M204357</guid>
      <dc:creator>Nick9123</dc:creator>
      <dc:date>2020-08-18T12:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid date format</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677447#M204358</link>
      <description>&lt;P&gt;You might want to check your Dateofaccountinformation variable. You can get that error when the variable is a datetime and not a date value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;1    data junk;
2      dateofaccountinformation = "03Jul2020:12:15:13"dt;
3    run;

NOTE: The data set WORK.JUNK has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds


4
5    proc sql;
6       select *
7       from junk
8       WHERE dateofaccountinformation BETWEEN '01ju12020'd AND
8  ! '31jul2020'd
ERROR: Invalid date/time/datetime constant '01ju12020'd.
9       ;
10   quit;
NOTE: The SAS System stopped processing this step because of
      errors.
&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2020 12:06:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-format/m-p/677447#M204358</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-08-18T12:06:31Z</dc:date>
    </item>
  </channel>
</rss>

