Miklos Koren <miklos.ko...@gmail.com> wrote: > This is probably a basic SQL question, but I could not make it work under > sqlite. How do I select records for which a datetime column is less than > today - 30 days? I tried > > SELECT * FROM ticket WHERE time < DATETIME('now','-30 days'); > > but it does not give the intended results.
Show your data, show the results you get from the statement, and explain how the observed outcome differs from your expectations. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users