You need to sign in to do that
Don't have an account?
aegirth
Using a SOQL query with a DATE parameter
Hello
Is it possible for me to use a query like Date()-7 for a certain date/time field so the query returns values for the last 7 days?
Something like :
select Id, OwnerId, dtDateDelivered__c from Service__c where dtDateDelivered__c < "TODAY()-7" ORDER BY dtDateDelivered__c LIMIT 10
Which doesn't work :)
Have a look at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm
It would be something similar to this:
If solved, please mark it.
Regards.
All Answers
You can do this via a SOQL variable rather than a formula. Should be something like:
Have a look at http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_soql_select_dateformats.htm
It would be something similar to this:
If solved, please mark it.
Regards.
This did it for me:
Solved. Thanks guys!