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
Varun99Varun99 

Comparing date time with date in soql

Hi,

 

 

How to compare datetime field with date in soql. my requrement is i have a datetime field in my object

am querying all records with compare that field with date.today() but am not getting any record

Bhawani SharmaBhawani Sharma
Select Id from Object where CreatedDate < TODAY
sushant sussushant sus
you can use in where

DATEVALUE(MyField__c)<today();