You need to sign in to do that
Don't have an account?
nagachandra kn
How to get all the accords which are older than 14 days? SOQL query
Hi All,
I have a requirement where i need write a batch class to delete all the records which are older than 14 days . How to write the SOQL for the same?
I have a requirement where i need write a batch class to delete all the records which are older than 14 days . How to write the SOQL for the same?
you can write query like following way
List<account> acclist=[select id,name,createddate from account where createddate=LAST_N_DAYS:14];
if you write query like this you will get records which are created fourteen days before .
Hi Nagachandra ,
Refer the below link for more details .
https://developer.salesforce.com/forums/?id=906F00000009357IAA
Replace the query with the following query .