我有一个日期表,并想选择给定日期间隔为 1.5 小时的日期。例如:
-- '2013-06-11 18:40' is the given date, and I want all dates that are
-- inside +/- 1.5 hour interval
SELECT datum
FROM table
WHERE date(datum) > date( date_sub( '2013-06-11 18:40', interval 1.5 hour ) )
AND date(datum) < date( date_add( '2013-06-11 18:40', interval 1.5 hour ) )