function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kotesh arudrakotesh arudra 

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

sfdcMonkey.comsfdcMonkey.com
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 

Thanks
let us know if it helps you
kotesh arudrakotesh arudra
Hi Piyush 
I have find the solution,Thanks for your reply
Thanks.
sfdcMonkey.comsfdcMonkey.com
awesome, then close your query with best answer so this thread will remove from unsolved query

Thanks
kotesh arudrakotesh arudra
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