开发者

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

开发者 https://www.devze.com 2023-04-03 16:26 出处:网络
How could I retrieve the last 24 hours of entries from the current time of retrieval? Any help is much appreciated.

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

精彩评论

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