Looks like you are not accounting for leaps years in your formula. The total days in 30 years is not 30*365, it is 30*365+(30/4), which adds 7 additional days.
Looks like you are not accounting for leaps years in your formula. The total days in 30 years is not 30*365, it is 30*365+(30/4), which adds 7 additional days.
Hi Dan,
Thanks for your reply. In the meantime, this is the formula that I am using
IF(DoB,
CONCATENATE(
DATETIME_DIFF(TODAY(), DoB, 'years'),"y ",
DATETIME_DIFF(
TODAY(), DATEADD(DoB, DATETIME_DIFF(TODAY(), DoB, 'years'), 'years'), 'days'),"d"))
STEP 1
DATETIME_DIFF(TODAY(), DoB, 'years'): Calculates the total number of years between the current date (TODAY()) and the
STEP 2
Date of Birth (DoB).
DATEADD(DoB, DATETIME_DIFF(TODAY(), DoB, 'years'), 'years'): Calculates the date corresponding to the next birthday after the most recent completed year. This is achieved by adding the number of years calculated in step 1 to the Date of Birth.
STEP 3
DATETIME_DIFF(TODAY(), ..., 'days'): Calculates the total number of days between the current date and the next birthday after the most recent completed year (as calculated in step 2).
STEP 4
CONCATENATE(...): Combines the calculated years and days into the desired format ("y d").
using your entire formula this data looks correct
