Informix and DateTimes and Syntax Errors, Oh my!
<p style="font-size:13.6000003814697px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">I'm running into a wall of syntax errors trying to use a Date parameter in a query against an Informix (11.50) database. I'm using this query:</p>
<p style="margin-left:40px;">select<br>
distinct SOMEVARIABLE<br>
from<br>
SOMETABLE<br>
where SOMEDATETIME > datetime (?) year to minute<br>
and SOMEDATETIME < datetime (2014-10-30) year to day</p>
<p> </p>
<p style="font-size:13.6000003814697px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">The query parameter type is set to Date and the report paramter is set to DateTime, formatted as a Short Date.</p>
<p style="font-size:13.6000003814697px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">The error I get is: java.sql.SQLException: Non-numeric character in datetime or interval.</p>
<p style="font-size:13.6000003814697px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">If I comment out the where clause, I can get BIRT to show me the value it's interpolating in the error: <strong>2014-10-27 00:00</strong>.</p>
<p style="font-size:13.6000003814697px;color:rgb(0,0,0);font-family:Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif;">As far as I can tell, this is the proper formatting for an Informix datetime literal. I'm beginning to lose what's left of my mind here...</p>