-2

Create Query on Lead to find All lead created today

I am using this SOQL method in query editor in developer console but not working

SELECT Name, country,LeadSource, ProductInterest__c, Primary__c,CreatedDate FROM lead where (CreatedDate='Today')

  • 4
    the SOQL documentation will be your best resource, specifically Date Formats and Date Literals. – Mark Pond Jun 13 '18 at 22:13
  • 1
    "It's not working" is usually not a helpful statement. In this case, your request is simple enough for at least some people to know what "not working" means, but good questions will have more details. A good place to start would be error messages. If you're getting an error message (and with this query, you very well should be getting an error), you should include the text of the error verbatim (that is, word for word, without paraphrasing) including the stack trace. – Derek F Jun 13 '18 at 22:51
1
SELECT Name, country,LeadSource, ProductInterest__c, Primary__c,CreatedDate FROM 
lead where CreatedDate= Today

Just remove the single quotes around Today. But I agree with @Mark @Derek, You need to be more clear in explaining and bit more research. all the best.

Not the answer you're looking for? Browse other questions tagged or ask your own question.