I am running an SOQL query to get 10th, 30th and 60th days before created records to notify users to take action. I wrote a query using LAST_N_DAYS:10 OR LAST_N_DAYS:30 in WHERE condition, but the expected results are not coming. I will have to write my own date logic behind to get it to work but why the out of the box feature in SOQL is not returning expected records. Am I doing any mistake here?
SELECT Id, LastModifiedDate FROM Account WHERE LastModifiedDate = LAST_N_DAYS:10
This is the same for CreatedDate and other dateTime datatype field in other custom object as well. Please advice. Thank you.