Im doing a select in which im specifying the date range..
"select key_id from result where started_at_date >= '2008-10-17 13:30:00' and ended_at_date <= '2008-10-17 13:30:20'"
but in the above query im getting the key_id for which the date range is out of the date range specified here.
That is im getting key_id = 5, for whcih started_at = '2008-10-18 13:30:00' and ended_at = '2008-10-18 13:30:20'
Please help me to solve this issue.