DateTime parameter drops the time

View: New views
1 Messages — Rating Filter:   Alert me  

DateTime parameter drops the time

by SohoSteve :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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