Tried this
select * from table where timestamp_field between 1330560000 and 1336170420
and this one
select * from table where timestamp_field >=1330560000 and timestamp_field<=1336170420
both return an empty result set.
But this
select * from table where timestamp_field >= 1330560000
returns all rows
To make things more absurd
select * from table where timestamp_field <= 1336170420
returns an empty result set.
Of course, there are timestamps before, between, and after 1336170420 = 4.may 2012. and 1330560000 = 1.march 2012.
Timestamp values ββin order, at least phpmyadmin shows the correct (human-readable) date and time values. I created timestamps by parsing strings using
UPDATE table SET timestamp_field = STR_TO_DATE(timestamp_string, '%d.%m.%Y')
Guess I missed something, but can't find what?
Prvul source share