function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael MMichael M 

Help with SOQL createddate -

Hello, i want to run a simply soql query for Contacts where the createddate is after 11/05/2020. What would be the syntax for this?
Best Answer chosen by Michael M
VinayVinay (Salesforce Developers) 
Hi Michael,

You can try below 
 
SELECT Id FROM Contact WHERE CreatedDate > 2020-05-11T00:00:00Z

Check below reference for Date Formats

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm

Thanks,

All Answers

VinayVinay (Salesforce Developers) 
Hi Michael,

You can try below 
 
SELECT Id FROM Contact WHERE CreatedDate > 2020-05-11T00:00:00Z

Check below reference for Date Formats

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm

Thanks,
This was selected as the best answer
Michael MMichael M
thank you!