Change around the string to conform to the default datetime
date pattern
ps.setString("2010-01-01 12:12:00.1230")
I think something like this should also work
select count(*) from table1 t
where start_datetime = TO_DATE(?,"%Y-%m-%d %H:%M:%S %F3")
Let me know