function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
RamanaRamana 

Issue with Date Literals in Where Clause

Helo All,

 

I am trying to execete the following SOQL:

 

Select e.Activity_Weight__c, e.ActivityDate, e.DurationInMinutes, e.OwnerId, e.Owner.Id, e.Owner.Name, e.Type from Event e where ActivityDate = LAST_MONTH 

 

When I ran this Query today, I get the events from 2nd April to 1st May. Can anybody advice what is happening here? I ran the same query with ActivityDate=THIS_MONTH and I get all the events from 2nd May to 1st June.

 

So, looks like the date lilteral is resolving the values shifted by 1 day. 

 

Thanks,

Ramana maddikunta