在mysql中,比如你的表的时间字段是column2,并且column2的类型是timestamp
单日查询:
select * from TableName where column1=‘xxxx‘ and date(column2)=‘2015-05-29‘
日期范围查询:
select * from TableName where column1=‘xxxx‘ and date(column2) between ‘2015-02-03‘ and ‘2015-06-03‘
时间: 2024-10-11 17:57:01