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.
到目前为止,我的方式是:
select * from time where date('now') > date(start_date) and date('now') < date(end_date);
我只是希望有一种简短的方法来构建相同的查询。我检查了 SQLite 的日期函数的文档,但它很难理解,并且没有一个明显的函数可以做到这一点。如果没有办法,那很好,但我想以 SQLites 的方式与专家用户核实。提前致谢!
SELECT * FROM TIME_TABLE WHERE DATE_COLUMN BETWEEN '01-01-2012' AND '12-31-2012'