1.to_days函数
select to_days(now());
返回从0000年(公元1年)至当前日期的总天数。
2.筛选创建时间是3月14号,3月22号,3月30号的数据导出。
select * from chat_timeout ct where to_days(ct.msg_time) in (to_days('2023-03-14'),to_days('2023-03-22'),to_days('2023-03-30'));
还有其他的方法,之所以没用or是因为还有很多其他筛选条件不方便用or