Skip to main content

I keep getting this error.  Why?

 

List<Case> userCreatedCases = [SELECT Id, CreatedById FROM Case WHERE CreatedDated = 2005-10-08T01:02:03Z];

2 respostas
  1. 13 de fev. de 2021, 17:34
    Hi Upton,

    Greetings!

    I can see that the field name that you have used is "CreatedDated" which should be CreatedDate only.You have entered "D" which is why you are getting the error.

    Please try the below SOQL query:

     

    List<Case> userCreatedCases = [SELECT Id, CreatedById FROM Case WHERE CreatedDate = 2005-10-08T01:02:03Z];

    Please mark it as best answer if it helps you to fix the issue.

    Thank you!

    Regards,

    Shirisha Pathuri
0/9000