Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个有趣的 SQL 问题。我习惯日期格式,常规日期,而不是:1286229819这是数据库中的实际日期。那么如何使用这种日期格式说“选择我上周的所有项目”?
1286229819
数据库:Mysql
SELECT * FROM projects WHERE project_date BETWEEN NOW() AND DATE_SUB(NOW(), INTERVAL 7 DAY)