Salesforce Developer Soql Examples

salesforce-developer-soql

Select EmailTemplate__c,EndDate FROM Campaign WHERE IsActive=true  AND EndDate >= LAST_N_DAYS:20
SELECT Id,EndDate From Campaign WHERE  EndDate <= TODAY
There are more date literals such as LAST_WEEK, THIS_WEEK, etc.  See http://sforce.co/1CTQzWS
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License