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

How Can I find date 365 days before from a given date in a field using soql query
I have a date field in Account . I need to find the date 365 days before the mentioned date in SOQL query
You need to sign in to do that
Don't have an account?
I am considering a Date type field "TestDate__c" on Account object. Find the logic for the same here:
Date backDate = System.Today().addDays(-365); //you can use System.Today().addYears(-1);
List<Account> accountList = [SELECT Id, Name, TestDate__c FROM Account WHERE TestDate__c <=: backDate];
//Note You need to change Date field "TestDate__c" accordingly
Hope it will help you.
Thanks
Niraj