sqlite select with condition on date

前端 未结 3 1033
一生所求
一生所求 2020-11-29 06:03

I have an sqlite table with Date of Birth. I would like to execute a query to select those records where the age is more than 30. I have tried the following but it doesn\'t

3条回答
  •  一整个雨季
    2020-11-29 06:06

    Using the magic docs at the sqlite website:

    select * from mytable where dob < date('now','-30 years');
    

提交回复
热议问题