[Trac] Re: Date Ranged queries

Justus Pendleton justus at ryoohki.net
Thu Jan 13 13:03:48 EST 2005


On 2005-01-13, Andy Lubel <lubela at tteam.com> wrote:
> Strftime is pretty cool but doesn't seem to want to play nice with me.  Ive
> really never worked with that sort of date format.  Can you point me on how
> to do the ranged query?

This page talks a bit about how sqlite's date and time functions work.

http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions

If you want to find all the files that changed in the previous month
then you'd want something like:

where time >= (select strftime ("%s", "now", "start of month", "-1
month")) and time < (select strftime ("%s", "now", "start of month"))



More information about the Trac mailing list