MYSQL query between two timestamps

2019-02-05 13:17发布

I have the following entry in my DB table

eventName(varchar 100) -> myEvent
date(timestamp) -> 2013-03-26 09:00:00

and I am trying to use the following query;

SELECT * 
FROM eventList 
WHERE `date` BETWEEN UNIX_TIMESTAMP(1364256001) AND UNIX_TIMESTAMP(1364342399)

i.e between 2013-03-26 00:00:01 and 2013-03-26 23:59:59

but it is giving me 0 results.

I have tried expanding the date range with no luck and there are definitely results within the range.

any help is appreciated.

7条回答
走好不送
2楼-- · 2019-02-05 13:42
SELECT * FROM `orders` WHERE `order_date_time`  BETWEEN 1534809600 AND 1536718364
查看更多
登录 后发表回答