#and db(db.table.field >= '2009-12-28')(db.table.field <= '2009-12-30').select() #or db(db.table.field == '2010-01-01' | db.table.field == request.now).select()
db(db.table.field.year() > '2008').select() db(db.table.field.day() < '5').select() -Thadeus On Sat, Feb 27, 2010 at 3:52 PM, Stelios Koroneos <[email protected]> wrote: > Hi, I'm trying to make a query function that accepts two datetime.date > object(start_date and end_date), and returns all records that are > between start_date and end_date. > However, I found nothing like a between function in the web2py manual, > so I was wondering what's the best way to achieve this. > I tried using the db.table.field.year(), db.table.field.month() and > db.table.field.day() but that would create a rather complex solution > -- > Stelios S. Koroneos > > Digital OPSiS - Embedded Intelligence > > Tel +30 210 9858296 Ext 100 > Fax +30 210 9858298 > http://www.digital-opsis.com > > -- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/web2py?hl=en. > > -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

