In a function I have:

events=db((db.event.from_datum>=fromdate)&
(db.event.from_datum<=todate).select()


The problem is that some events last more than one day, they have both
a from_date and to_date. In the view the user selects a date an the
number of weeks he wants to see the events for. For one day events
this works. However, when I have an event that starts on 23rd June and
ends on 30th June and the visitor selects 25th June as the date from
which he wants to see the events, this events isn't included in the
result.

What I need is something like:

events=db(((db.event.from_datum>=fromdate)|
(db.event.to_date>=fromdate))&(db.event.from_datum<=todate).select()

I wonder whether this is possible.


Kind regards,

Annet.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to