You are right; you can't have a query with inequality operators on two
fields.
But you can get the result you want, if you add another field to your
object that holds both dates.
There's a new entry in the Google App Engine Cookbook that shows how:
http://appengine-cookbook.appspot.com/recipe/how-to-query-by-date-range

Garrett Davis

On Feb 4, 6:47 pm, arnie <parvez...@rediffmail.com> wrote:
> I have applied the DATETIME method as suggested but unable to use
> inequality operator for 2 datetime fields.
> I have tried this too
> b=db.gqlquery('SELECT * FROM myTable WHERE field1=:val1 and
> sdate>=DATETIME(2009,11,20,0,0,0)')
> b=b.filter('where edate<=DATETIME(2009,11,20,0,0,0)')
> But it does not work. How can I use the comparsion so as to get
> results based on using the two table fields?
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to