You need to sign in to do that
Don't have an account?

Select all event records where startdatetime=enddatetime
List<Event> lstevt =[Select Subject,StartDateTime, EndDateTime,Description from Event where StartDateTime!=null and StartDateTime = EndDateTime]This is not working , i need to select all event records where startdatetime=enddatetime
When you say, You want records where startdatetime = enddatetime.. That means they need to equal even by seconds. Not just Date, Hour and minutes.
In most cases, This is not the case as seconds part of the time will be different. So, I would suggest you to compare Just Date, Hour and minutes.
Let me know if it Works..
Best,
Nithesh
I need to create a event record for one hour slot thru apex code.
if I set event.startdatetime= date.addhours(8);
Adding 8 hrs to start time from 12. But calendar is showing
slot for 3 AM. I already set all timezone as same.
can you please help?