You need to sign in to do that
Don't have an account?
GraceW
Query event during a time period
Hi,
What do I need to modify in order to get the following code to run? Especially for the conversion between Java Date and SF DateTime. Thanks!
QueryResult getEvents(Date beginDate, Date endDate, String ownerID, SoapBindingStub binding )throws RemoteException{
String queryStr="select * from Event where OwerId = '" + ownerID + "' and ActivityDateTime > "
+ beginDate + " and ActivityDateTime < " + endDate;
QueryResult qr = null;
try{
qr = binding.query(queryStr);
return qr;
}catch(Exception e){
System.out.println(e.toString());
return null;
}
}
What do I need to modify in order to get the following code to run? Especially for the conversion between Java Date and SF DateTime. Thanks!
QueryResult getEvents(Date beginDate, Date endDate, String ownerID, SoapBindingStub binding )throws RemoteException{
String queryStr="select * from Event where OwerId = '" + ownerID + "' and ActivityDateTime > "
+ beginDate + " and ActivityDateTime < " + endDate;
QueryResult qr = null;
try{
qr = binding.query(queryStr);
return qr;
}catch(Exception e){
System.out.println(e.toString());
return null;
}
}
The dateTimes need to be in ISO8601 format (e.g. 2006-12-22T13:00:00Z)