Non-numeric character in datetime or interval

Non-numeric character in datetime or interval

I'm getting this error when I run my job: 
Exception in component tInformixInput_1
java.sql.SQLException: Non-numeric character in datetime or interval.
I'm sure it's related to the portion of my WHERE clause that references my global variables. Am I missing a tick mark or a parenthesis or something? It seems right.
AND  (ccdr.startdatetime - INTERVAL(6) HOUR to HOUR) BETWEEN '" + ((String)globalMap.get("CurrentDate")) + " " + ((String)globalMap.get("PreviousHour")) + ":" + ((String)globalMap.get("MinuteInterval")) + ":00' AND '" + ((String)globalMap.get("CurrentDate")) + " " + ((String)globalMap.get("CurrentHour")) + ":" + ((String)globalMap.get("MinuteInterval")) + ":00' 

Here are my global variables:

Community Manager

Re: Non-numeric character in datetime or interval

try to remove the single quote around the datetime.
AND  (ccdr.startdatetime - INTERVAL(6) HOUR to HOUR) BETWEEN " + ((String)globalMap.get("CurrentDate")) + " " + ((String)globalMap.get("PreviousHour")) + ":" + ((String)globalMap.get("MinuteInterval")) + ":00' AND "
----------------------------------------------------------
Talend | Data Agility for Modern Business

Re: Non-numeric character in datetime or interval

I took the first single quote off and received a syntax error. I took away the corresponding single quote and received a syntax error. I removed all the single quotes and received a syntax error. I replaced all the single quotes and the job ran successfully...
I hadn't changed anything since I posted this problem, but somehow the job works now. Bug in the system?
Thanks for your help!
Community Manager

Re: Non-numeric character in datetime or interval

I think there must be a wrong syntax in your previous query, not a bug of component, because it is runtime error thrown by database, if the job has a compilation error, the job can not be run.
----------------------------------------------------------
Talend | Data Agility for Modern Business