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 google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to