How do I apply a GQL query such that it lists the user_name in the UserInformation model table of those who have logged in within the last 3 days?
+3
A:
I am presuming UserInformation is your own class, it is not part of any App Engine model that I know and you are using python.
You won't be able to return just a list of user_names, you will get a collection of UserInformation model instances.
Do you have a last login date property in your model? If yes, then the following should work.
three_days_ago = datetime.datetime.now() - datetime.timedelta(days = 3)
users = db.Query(UserInformation).filter("login_date >", three_days_ago).fetch(10)
Kinlan
2009-11-25 12:38:54
thanx sir.. i think this will be more helpful..
Mayur
2009-12-02 13:28:04