+ 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();