Changed SQL query

Changed SELECT to use datetime instead of date for determining current time minus 1 hour