i have one Account record under that record i have contact records, in contacts i have a filed called Interviewdate Now my requirement is i want to write a query to get Conatcts under that Account record where in that Contact date filed is Today()-100.Can
HI kotesh, you can get all contacts for a account where contact InterviewDate__c equal to 100 days before by this way :
date before100Days = system.today() - 100;
system.debug('before100-->' + before100);
List<account> lstAccount = [select id,Name,(select id,Name from contacts where date__c =: before100Days ) from account where id = '0016F00001rBzK3'];
system.debug(lstAccount[0].contacts); // here you will be get your contact list
select id,Name,(select id,lastname,Kuzu_Interview__c from Contacts where Kuzu_Interview__c = LAST_N_DAYS:100 and createddate= LAST_N_DAYS:100 )from Account
you can get all contacts for a account where contact InterviewDate__c equal to 100 days before by this way :
Thanks
let us know if it helps you
I have find the solution,Thanks for your reply
Thanks.
Thanks