Hi i want to get the all the events in between startdatetime to enddatetime.but i am not getting the records.
My code is:
@RemoteAction
public static string eventdata(Datetime starts,Datetime ends){
for(Event evnt: [select Id, Subject, isAllDayEvent, StartDateTime, EndDateTime from Event where ownerid=:userinfo.getUserId() and startdatetime>=:starts and enddatetime<=:ends]){
}
}
in the vfpage:function getEventData() {
// records are retrieved from soql database
Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.WisconsinCalendarController.eventdata}',
// controller and method names
start.toUTCString(),
end.toUTCString(),
function(result, event)
{
console.log(result);
if (event.status)
{
In the select query i am not getting values.
The values of starts is 2016-04-22 00:00:00 ends is 2016-04-30 00:00:00 I tried in the query editor if the starts and ends value format like 2016-04-22T00:00:00Z then i am getting the values but in the coding i give starts and ends values like above format i am getting Invalid date/time: 2016-04-21T20:00:00Z