I have created a CustomList called BirthdayReminder and also set up a Site-workflow which runs everyday at 00:00 to update the fields - otherwise the Birthday Reminder will stay static.
My aim is to check the nextBirthday if it's equal to todays date and if so, display "Happy Birthday" - otherwise display the days remaining including the text "has birthday in xx days"
Anyway, I got 2 fields and 2 calculated fields :
Username | Birthday | nextBirthday | daysUntilNextBirthday
nextBirthday:
=DATE(YEAR(Birthday)+DATEDIF(Birthday,TODAY(),"Y")+1,MONTH(Birthday),DAY(Birthday))
daysUntilNextBirthday:
=IF([nextBirthday]=TODAY(),"Happy Birthday","has birthday in "&DATEDIF(TODAY(),[nextBirthday],"d")&" days")
The custom list shows:
what I am worried about is that as soon as the Site-workflow runs, it will update both calculated fields. I wonder if the daysUntil... field will actually manage to display the "Happy BDay" before the nextBirthday gets updated! hmmm!!
I tried to somehow combine all this with the DATEIF but not much luck.
This topic is similar to this:
Calculated Field with formula DATEDIF