1

Not able to compare dates returned from one SOQL as a list into another SOQL's where clause:

ApexCode to store all date data into list:

List<Account> a = [SELECT ID, FIRSTNAME,PersonContactId,PersonBirthdate FROM ACCOUNT];
 List<Date> dob = new List<Date>();
 for(Account r: a){
  dob.add(r.PersonBirthdate);
 }

ApexCode with another:

List<Account> b = [SELECT ID, FIRSTNAME,PersonContactId,PersonBirthdate FROM ACCOUNT WHERe PersonBirthdate IN: dob];

No data returned

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.