+ Start a Discussion
Ishan Singh 4Ishan Singh 4 

I want to make a query in my batch class for leads whose birthday is exact 7 days from today so what formula I should use?

Currently  I am using NEXT_N_DAYS : 7 but it is running for leads with 7 days and also for less than 7 days
Sachin HoodaSachin Hooda
Hi Ishan,
To get the specific records you can do like,
Date dt = System.today().addDays(7);
CustomObject__c obj = [SELECT Id From CustomObject__C where birthdate__c =: dt];
In case you still have any problem, please post them here.