Use a parameter (if you are using JDO):

  query.setFilter("startTime > p1");
  query.declareImports = "import java.util.Date";
  query.declareParameters = "Date p1";

  Object[] aobjParams = new Object[1];
  aobjParams[0] = new Date();

  List liResults = (List)query.executeWithArray(aobjParams);


There are other ways to do this, but I use this way a lot.

Ian


On Jun 15, 5:40 pm, hairinwind <[email protected]> wrote:
> What I want to do
>
> query.setFileter("startTime > now ")
>
> how to pass in the parameter for 'now'?
>
> I tried both below and non of them works
>
> query.setFileter("startTime > " + (new Date()))
> query.setFileter("startTime > " + (new Date().getTime()))
>
> Please suggest!
>
> Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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-java?hl=en.

Reply via email to