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
sayirbsayirb 

Date time error in SOSQL

I have  a query which  uses datetime filter as below:

 

list<contact> tomorrowCalls= [select id, account.practice_rep__r.name,account.practice_rep__r.email from contact where receives_report__c=true AND email!=null AND accountid in (SELECT id from account WHERE DAY_IN_MONTH(next_progress_call__c)>=7 AND next_progress_call__c = TOMORROW)];

 

While running this  I got the following error : 

 

System.UnexpectedException: value of filter criterion for field 'next_progress_call__c' must be of type dateTime and should not be enclosed in quotes "

 

 I have cross checked the data type of  next_progress_call__c, its in  Date/Time. And this is running under a scheduler.

 

Please help me to find a solution.

 

Thanks