Has anyone ever faced an issue with LAST_N_MONTHS:N in SOQL? As per salesforce doc:
For the number n provided, starts 00:00:00 of the last day of the previous month and continues for the past n months.
Well the below SOQL works fine as it returns data for last 12 months excluding current month:
SELECT Id FROM Account WHERE CreatedDate = LAST_N_MONTHS:12
But if run the below SOQL, it returns data for last 12 months plus current month
SELECT Id FROM Event WHERE ActivityDateTime = LAST_N_MONTHS:12
Is it a bug?