I have next code:
SELECT * FROM lc_t_ordenes
WHERE fecha_registro between date(%s) and date(%s)+.9
ORDER BY fecha_registro ASC
When the date is between 2016-10-01
and 2016-10-30
it works but when I try to find only records when date is 2016-10-31
doesn´t work.
In table date is timestamp
. How can I find records between date1 (2016-10-01 00:00:00)
and date2 (2016-10-01 23:59:59)
?
User only puts 2016-10-01
.