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
sfdc startsfdc start 

plz answer soql query

How you can use Datetime field as a criteria in SOQL Query
UC InnovationUC Innovation
The following links should be helpful:

https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm
http://salesforce.stackexchange.com/questions/8896/using-a-date-for-a-datetime-field-in-a-soql-query
https://developer.salesforce.com/forums/?id=906F00000008nAXIAY
Aniket Malvankar 10Aniket Malvankar 10
Hello,

You can use :

SELECT Id FROM Account WHERE CreatedDate > YESTERDAY
Please have a look : https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm 

Thanks
Aniket
Amit Chaudhary 8Amit Chaudhary 8
Please check below post for example
1) https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm

If you want to pass the custom date and time  then you can pass the value like below
WHERE CreatedDate > 2005-10-08T00:00:00Z
Other wise you can use the standard method like below
User-added image

Let us know if this will help you