+ Start a Discussion
Mohan kumar 167Mohan kumar 167 

How do we calculate birthdate with in 40 days?

Hi,
I have to enable birthdate remainder boolean check on contact, If the contact birthdate reaches to 20, 21 and 28 years with in 40 days of the contact birthdate. for example if the contact reaches 20 years in next 40 days then we have to enable boolean check on contact that means we have to enable boolean after contact age is 19 years 10 months and 20 days till he reaches to 20 only not more than 20 like wise for 21,28 years.
I tried following formula but it is not working as expected and It considers the after 20 years and 40 days also but I want before 40 days.
IF( AND( NOT( ISBLANK( Birthdate ) ) , OR(YEAR(TODAY()+40) - YEAR(Birthdate) = 20,YEAR(TODAY()+40) - YEAR(Birthdate) = 21,YEAR(TODAY()+40) - YEAR(Birthdate) = 28),DATE(YEAR(TODAY()),MONTH( Birthdate ),DAY(Birthdate )) <= (TODAY() + 40)) , true,false)

Thanks,
Mohan
Keerthan BernyKeerthan Berny
Do you want to make sure that you think positive things, so that you can bring good energy into your life?
Here's a list of the best positive statements and sayings every day to have a good morning (https://loveaffirmation.com/morning-affirmations/) to make you feel comfortable and start your day off right now!  I have a lot of articles about how you can make your own statements that should help you get started on your own.