I am trying to do a convert from a parameter to a datetime stamp. Here is my code: ... bus_start_date between (CONVERT(DATETIME,\'args\', 102)) and (CONVERT(DATETIME,\'args\', 102))) ... Exception in thread "main" java.sql.SQLException: Syntax error converting datetime from character string.
When I enter a hard coded sting instead of the parms it works ex('2008-01-02 00:00:00')
Can ANY one help please,
Thank you in advance
posted 8 years ago
It has nothing to do with Java. You have an SQL syntax error here. What database are you using? Whatever it may be, the arg is not translating into actual value here.