Use date fields in ...
 
Notifications
Clear all

[Solved] Use date fields in where clause in soql

2 Posts
1 Users
0 Likes
266 Views
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

How to use a date field in the where clause in soql?

Issue Tags
1 Reply
Posts: 205
 CWL
Admin
Issue starter
(@cwl)
Member
Joined: 11 years ago

Date time is in yyyy-mm-dd and UTC time format. Example:

SELECT Id, CreatedDate FROM Sales_Order__c WHERE CreatedDate < 2013-05-21T00:00:00Z

Reference: Date Formats and Date Literals in WHERE Clauses | SOQL and SOSL Reference | Salesforce Developers

Reply
Share: