sqlite选择日期条件

我有一个带有出生日期的sqlite表。我想执行一个查询来选择那些年龄超过30的记录。
我尝试了以下操作,但它不起作用:
select * from mytable where dob > '1/Jan/1980'
select * from mytable where dob > '1980-01-01'
可以使用这样的一些东西:
select dateofbirth from customer Where DateofBirth  BETWEEN date('1004-01-01') AND date('1980-12-31');  
select dateofbirth from customer where date(dateofbirth)>date('1980-12-01');
select * from customer where date(dateofbirth) < date('Now','-30 years');

如果您使用的是sqlite V3.7.12或更高版本

不要使用date(生日)只是使用dateofbirth。所以你的查询如下所示:

select * from customer where dateofbirth < date('Now','-30 years');

相关文章

SQLite架构简单,又有Json计算能力,有时会承担Json文件/RES...
使用Python操作内置数据库SQLite以及MySQL数据库。
破解微信数据库密码,用python导出微信聊天记录
(Unity)SQLite 是一个软件库,实现了自给自足的、无服务器...
安卓开发,利用SQLite实现登陆注册功能