« Return to Thread: DateTime parameter drops the time

DateTime parameter drops the time

by SohoSteve :: Rate this Message:

Reply to Author | View in Thread

I have two DateTime parameters, startDate and endDate.
They are referenced in my SQL query in

myrec.timestamp between ? and ?

One parameter (startDate) is also referenced in

select ? from dual, ...

In all cases, only the date portion of the parameter (enclosed in single quote marks) is sent to the MySQL engine, as shown by

SHOW FULL PROCESSLIST

The time portion is simply dropped.

Any ideas?

Thanks,
Steve

 « Return to Thread: DateTime parameter drops the time