Tony, Try asking this question on StackOverflow with the google-app-engine tag:
https://groups.google.com/forum/?fromgroups#!topic/google-appengine/Z6XN_64cA7w -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com On Sun, Mar 11, 2012 at 6:50 PM, Tony Yang <[email protected]> wrote: > Dear Sir, > Would you help the issue below. Is it possible to query Datastore by > parameter of Date? > > --- My code ---- > PersistenceManager pm = PMF.get().getPersistenceManager(); > Query query = pm.newQuery(Customer.class); > Date currentDate = new Date(); > Date beforeDate = new Date(); > long currentdate = currentDate.getTime(); > long beforedate = currentdate - 86400000*5; //search data in > Customer.class within 5 days > beforeDate.setTime(beforedate); > query.setFilter("date > offsetDate"); // date is > column's name in Customer.class > query.declareParameters("Date offsetDate"); > List<Customer> conn = (List<Customer>) > pm.newQuery(query).execute(beforeDate); > > --- Error message from system is as below : > > Class Date for query has not been resolved. Check the query and > any imports specification > > Thanks a lot. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
