无法获得android sqlite select语句来工作

时间:2011-10-26 04:02:08

标签: android sqlite

我正在尝试选择已在我的数据库中过期但未返回任何内容的项目。我尝试了以下内容:

select * from productTable where columnExpiration < date( currentDate)

所有日期格式为yyyy-mm-dd

如果不起作用,我试过:

Select* from productTable where columnExpiration < currentDate

有什么建议吗?这真的开始让我发疯。感谢

1 个答案:

答案 0 :(得分:0)

Try here,已经被问过,并有一个解决方案:

在比较之前使用Datetime()格式化日期。

相关问题