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
Animesh DattaAnimesh Datta 

get records created 30 days ago

I am working on a batch class to delete records created 30 days ago.
using the below query but it is not working. Kindly help.

select id from BU_Monitors_Opportunity__c where CreatedDate <

Best Answer chosen by Animesh Datta
NagaNaga (Salesforce Developers) 
Hi Animesh,

The only difference in the below link is they have deleted the records based on the "last modified date", you have to apply it for "created date"

The only difference 

User-added image

Please let me know if this helps

Best Regards
Naga Kiran