This is not possible without changing your model.
The simplest option would be to use two inequality filters in the datetime property (> date 00:00 and <= date 23:59), but then you could not use any other inequality in your queries.
Another option (an?) Is to introduce a second property that contains the date value you are filtering:
class YourModel(ndb.Model): some_datetime = ndb.DateTimeProperty() some_date = ndb.ComputedProperty(lambda self: self.some_datetime.date)
If you only need to filter by date, then your datetime property may have indexed=False , but otherwise you will have the cost of the additional index.
source share