I have a table with information about kids on a team I coach. I have a field for their birthdates and use that to calculate their age divisions. I’d like to use a calendar view to show upcoming birthdays, but the calendar view based on their birthdates doesn’t work, of course, because their birthdates aren’t in the current year. Is there a way to do this?
Page 2 / 2
I was able to get this to work. I used a slightly diffferent formula.
IF(
{Birthday},
DATETIME_PARSE(
MONTH({Birthday}) & "/" & DAY({Birthday}) & "/" & YEAR(TODAY()),
'MM/DD/YYYY'
)
)
This is very simple and grabs the month, day and current year. The IF statement prevents blanks from showing up as January 1st. The DATEPARSE is needed to allow the calendar widget and other views to give you date options.
Used the above example and added formulas so that it would automatically change the YEAR to the following year for dates that have passed. This way you don't have to reset the year every January. Works great in Calendar and there is a great Grid view for this as well:
IF(
{Date of Birth},
IF(
MONTH({Date of Birth}) < MONTH(TODAY()),
DATETIME_PARSE(
MONTH({Date of Birth}) & "/" & DAY({Date of Birth}) & "/" & (YEAR(TODAY()) + 1),
'MM/DD/YYYY'
),
IF(
AND(
MONTH({Date of Birth}) = MONTH(TODAY()),
DAY({Date of Birth}) <= DAY(TODAY())
),
DATETIME_PARSE(
MONTH({Date of Birth}) & "/" & DAY({Date of Birth}) & "/" & (YEAR(TODAY()) + 1),
'MM/DD/YYYY'
),
DATETIME_PARSE(
MONTH({Date of Birth}) & "/" & DAY({Date of Birth}) & "/" & YEAR(TODAY()),
'MM/DD/YYYY'
)
)
),
BLANK()
)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.