I am writing an Batch apex where I need to query the records which are created today(System date).
I created one field name
Created_Date_Formatted__c which just gives me only date from
In my start(Database.BatchableContext BC) method, I am passing my query as string
query ='SELECT id,name FROM sObject__c WHERE Created_Date_Formatted__c = '+ String.valueOf(System.now());
I have tried putting date in different format but it doesn't work. I would really appreciate if anyone can help me. Please let me know if anything else is also required from my side. I will update the thread. Thanks