Skip to content
Advertisement

sqlite select with condition on date

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 work:

Advertisement

Answer

Some thing like this could be used:

If you are using Sqlite V3.7.12 or greater

Dont use date(dateofbirth) just use dateofbirth. So your query would look like this:

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement