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

get records created 30 days ago
Hi,
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.
Regards,
Animesh
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.
Regards,
Animesh
select id from BU_Monitors_Opportunity__c where CreatedDate < system.today().addDays(-30)
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"
https://developer.salesforce.com/forums/ForumsMain?id=906F00000009357IAA
The only difference
Please let me know if this helps
Best Regards
Naga Kiran