0

I am a fresher and i am not able to represent in coding format for the previous week logic. The requirement is i have a date field called funding date.I have to fetch the records where this date field have previous week's date. For example,

SELECT fund__c,amount__c where funding_Date__c=previous week. 

In the query,in the place of previous week i dont know what logic i have to use so that i can fetch when that date field has previous week dates.

Please help.

Thanks.

3 Answers 3

3

You can use the date literal LAST_WEEK:

SELECT Fund__c, Amount__c FROM Funding__c WHERE Funding_Date__c = LAST_WEEK 
3

Use Date Formats and Date Literals in salesforce.

SELECT fund__c,amount__c where funding_Date__c=LAST_WEEK 
2

you can use something like this SELECT Id FROM Account WHERE CreatedDate > LAST_WEEK

SELECT fund__c,amount__c where funding_Date__c=LAST_WEEK 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.