开发者

Retrieving the last 24 hours of entries in Google App Engine Python datastore

How could I retrieve the last 24 hours of entries from the current time of retrieval? Any help is much appreciated.

-Edit: They do have a DateTimeProperty of when they were added. I am specifically unsure of how to formulate a GQL query that would compare the current time and retrieve only the entri开发者_Python百科es that are within 24 hours.


The only way to do this is to put timestamps on all your entities, and query for them individually (kind by kind) with a filter for only those created after the specified date.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜