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.
我有一列包含日期时间条目,我想获取过去 24 小时内的所有项目。现在我正在尝试:
SELECT * FROM " + SQLHelp.LOG_TABLE + " WHERE " + SQLHelp.TIME_COLUMN + "> datetime('now','-1day')
其中SQLHelp.LOG_TABLE and SQLHelp.TIME_COLUMN分别是表名和列名。
SQLHelp.LOG_TABLE and SQLHelp.TIME_COLUMN
-1和之间必须有空格day;datetime('now','-1 day')按预期工作。
-1
day
datetime('now','-1 day')