[Trac] Re: Date Ranged queries

Justus Pendleton justus at ryoohki.net
Thu Jan 13 13:21:30 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?

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

documents the sqlite date and time functions.  To find everything that
happened last month 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