+ Start a Discussion
NehaaNehaa 

SOQL Query - Weekly data

Hi,

 

I would like to extract the records that are created in this week . Can we do this without hardcoding the dates? 

We have an option in Reports, but other than reports can we extract weekly data?

 

Select Id from Contact where created date = this week???

 

Thanks

kevin lamkevin lam

SELECT Id FROM Contact WHERE CreatedDate = THIS_WEEK

NehaaNehaa
This works!! Thank you so much!!
Ashish_SFDCAshish_SFDC

Hi Nehaa, 

 

See the article below which has the list of date literals, 

 

https://help.salesforce.com/apex/HTViewHelpDoc?id=custom_dates.htm&language=en

 

Regards,

Ashish