python - converting NDB Datetimeproperty to date -
i have ndb datetime property stored on google app engine. i'm trying query records since yesterday converting datetime date, filtering query greater or equal yesterdays date. however, getting following error:
follower_trans = fol.query( datetime.datetime.date(fol.followed_date) >= self.yesterday).fetch()
typeerror: descriptor 'date' requires 'datetime.datetime' object received 'datetimeproperty'
if use datetime.date()
sends error requiring integer argument.
you can't conversion part of query, you'll have create 'yesterday' datetime , filter using that.
Comments
Post a Comment