Select Id from Account where LastModifiedDate < THIS_YEAR or Select Id from Account where Calender_Year(LastModifiedDate) < THIS_YEAR
See these links: http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_date_functions.htm
If you have records in Account object which are not modified since one year, You can query
SELECT Id , Name , LastModifiedDate from Account where LastModifiedDate < 2014-01-01T00:00:00.000+0000 limit 10
Important :
If this is what you where looking for then please mark it as a solution for others benefits.
Thank You
Use below query:
If this solves your problem, kindly mark it as the best answer.
Thanks,
Vatsal
Use Below Query:
SELECT Id,Name,LastModifiedDate FROM Account WHERE LastModifiedDate < LAST_N_DAYS:366
If this solves your problem, Kindly mark it as the best answer.
Thanks,
SFDC Beginner
This Query works for current Date only
SELECT Id,Name,LastModifiedDate FROM Account WHERE LastModifiedDate < LAST_N_DAYS:366
If this solves your problem, Kindly mark it as the best answer.
Thanks,
SFDC Beginner.
or
Select Id from Account where Calender_Year(LastModifiedDate) < THIS_YEAR
See these links:
http://www.salesforce.com/us/developer/docs/officetoolkit/Content/sforce_api_calls_soql_select_dateformats.htm
http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_date_functions.htm
SELECT Id,Name,LastModifiedDate FROM Account WHERE LastModifiedDate < :system.today().addYears(-1)