You need to sign in to do that
Don't have an account?
Hari nadh babu Eluru 7
The error is appeared at in "studentList =" on here at in equalto symbol. Please resolve my problem. Thank you !
Getting Error in the above code
Date myOldDate = Date.newInstance(2021, 1, 1); Date myTodayDate = date.today(); List<Student__c>studentList = new List <Student__c>(); studentList = [SELECT Student_Id__c, Name, Joining_Date__c FROM Student__c WHERE Joining_Date__c >: myOldDate AND Joining_Date__c :<= myTodayDate];In this above code i had getting this below error
The error is appeared at in "studentList =" on here at in equalto symbol. Please resolve my problem. Thank you !
Date myOldDate = Date.newInstance(2021, 1, 1);
Date myTodayDate = date.today();
List<Student__c>studentList = new List <Student__c>();
studentList = [SELECT Student_Id__c, Name, Joining_Date__c FROM Student__c
WHERE Joining_Date__c > :myOldDate AND Joining_Date__c <= :myTodayDate]; // Here's the error, you have to use the colon after the equals
I hope you find the above solution helpful. If it does, please mark it as Best Answer.
Thanks and Regards,
Suraj
All Answers
Date myOldDate = Date.newInstance(2021, 1, 1);
Date myTodayDate = date.today();
List<Student__c>studentList = new List <Student__c>();
studentList = [SELECT Student_Id__c, Name, Joining_Date__c FROM Student__c
WHERE Joining_Date__c > :myOldDate AND Joining_Date__c <= :myTodayDate]; // Here's the error, you have to use the colon after the equals
I hope you find the above solution helpful. If it does, please mark it as Best Answer.
Thanks and Regards,
Suraj
YOUR CODE WAS CORRECT , BUT ONLY ONE MISTAKE, use <= : INSTED of :<=
Please use below code
if you need any assistanse, Please let me know!!
Kindly mark my solution as the best answer if it helps you.
Thanks
Mukesh
your code is looking good but you committed a very minor mistake. you should have add colon(:) after (=).
just code and paste below code your issue will be resolved.
let me know by marking it as best answer.
Thank you
did you try my solution. if it works then mark it as best answer.
thank you