<?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/time/datetime constant in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/242276#M44960</link>
    <description>&lt;P&gt;I know this is a basic request (I'm a relatively new SAS user), but I keep getting the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Invalid date/time/datetime constant '08/31/2010'd.&lt;/P&gt;&lt;P&gt;ERROR: Invalid date/time/datetime constant '03/01/2011'd.&lt;/P&gt;&lt;P&gt;ERROR: Syntax error while parsing WHERE clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; caperfy11mo01_07;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; caper.caperfy11mo01_12;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;where&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'08/31/2010'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt; &amp;lt; encdate1 &amp;lt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'03/01/2011'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;encdate1 is formatted mmddyy.10 in caper.caperfy11mo01_12; and when I look at the data, the values for encdate1 appear as I've written them in the code.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Any help is greatly appreciated. Thank you.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2016 20:25:12 GMT</pubDate>
    <dc:creator>janet0102</dc:creator>
    <dc:date>2016-01-07T20:25:12Z</dc:date>
    <item>
      <title>Invalid date/time/datetime constant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/242276#M44960</link>
      <description>&lt;P&gt;I know this is a basic request (I'm a relatively new SAS user), but I keep getting the following error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR: Invalid date/time/datetime constant '08/31/2010'd.&lt;/P&gt;&lt;P&gt;ERROR: Invalid date/time/datetime constant '03/01/2011'd.&lt;/P&gt;&lt;P&gt;ERROR: Syntax error while parsing WHERE clause.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my code:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; caperfy11mo01_07;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; caper.caperfy11mo01_12;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;where&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'08/31/2010'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt; &amp;lt; encdate1 &amp;lt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'03/01/2011'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;encdate1 is formatted mmddyy.10 in caper.caperfy11mo01_12; and when I look at the data, the values for encdate1 appear as I've written them in the code.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;Any help is greatly appreciated. Thank you.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2016 20:25:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/242276#M44960</guid>
      <dc:creator>janet0102</dc:creator>
      <dc:date>2016-01-07T20:25:12Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid date/time/datetime constant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/242279#M44963</link>
      <description>&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'08/31/2010'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt; &amp;lt; encdate1 &amp;lt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'03/01/2011'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt; is attempting use date literals. SAS requires literals to be ddMONyy or ddMONyyyy&lt;/P&gt;
&lt;P&gt;use&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New"&gt;where&lt;/FONT&gt;&lt;FONT face="Courier New"&gt; (&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'31AUG2010'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt; &amp;lt; encdate1 &amp;lt; &lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New"&gt;&lt;FONT color="#008080" face="Courier New"&gt;'01MAR2011'd&lt;/FONT&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New"&gt;);&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jul 2016 19:51:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/242279#M44963</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-12T19:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid date/time/datetime constant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/302676#M64216</link>
      <description>Thank you for this solution. I've battled my program for 30 mins now...</description>
      <pubDate>Wed, 05 Oct 2016 14:42:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/302676#M64216</guid>
      <dc:creator>cgray</dc:creator>
      <dc:date>2016-10-05T14:42:24Z</dc:date>
    </item>
    <item>
      <title>Re: Invalid date/time/datetime constant</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/332620#M74888</link>
      <description>&lt;P&gt;I have the same problem but your solution doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;where=('01MAI2011'd &amp;lt;= Date_decision_octroi &amp;lt;= '30AVR2012'd)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date_decision_octroi is mmddyy10.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 14:14:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Invalid-date-time-datetime-constant/m-p/332620#M74888</guid>
      <dc:creator>sophie3</dc:creator>
      <dc:date>2017-02-14T14:14:22Z</dc:date>
    </item>
  </channel>
</rss>

