#Calendar : Convert a date birth in a recurrent date of birth

Hello,
I’m new to Glide and I need your help.
I would like to activate reminders for birthdays by having initially entered their date of birth.
How to convert the date of birth entered (ex: 06/05/95) into a recurring and annual birthday date (ex: 06/05/22, 06/05/23, 06/05/24…) so that the date can automatically be inserted into the calendar?
Thank you
Florence

Hi @Fleau75,

Welcome to the community :partying_face:

Not good with Dates :upside_down_face: but I think this should work!

All columns :

image

Birthday column ( Date and Time Basic column ) that user adds their birthday :

image

image

Day column ( Math column ) that gets the day of the birthday column :

image

Month column ( Math column ) that gets the month of the birthday column :

image

Now Year column ( Math column ) that gets the year of today’s date :

image

Date column ( Template column ) to connect Day,Month,Now Year column to make the date :

image

image

Display inside the Calendar Layout :

For test I added 365 days to the Now column and I get the 2023 year :

image

Just thought to tag Jeff ( @Jeff_Hager :- Master of Dates ) to know if he has a different solution and to confirm If I’m correct :slightly_smiling_face: Not only Jeff, there are some more makers that so much better with Dates but this post might get like a spam if I tagged them all.

Thank you

5 Likes

Here, you can just point it to the “Now” value instead of having to create a “Now” column.

Otherwise, if the template column works in the Calendar view then I would assume that is the correct answer.

1 Like

Thanks Thinh! I think I overthink-ed that part :sweat_smile: I have updated my post!

Haven’t tried this for all dates/years—maybe this works in a single math column?

9 Likes

Awesome Robert! Thanks for sharing!

2 Likes

Extra Robert, it works!
Thank you very much, I’m so impressed with this community, it’s great to have this support.
Many many thanks !

3 Likes

Thank you very much Dilon for all these explanations.
For the moment, I used Robert’s method and it worked! For me who is starting and who absolutely does not know how to code at the base, this community is a great help so thank you again for all these shares.

1 Like

Glad it worked!

I applied your formula and it works fine except for a date in my current short list… no idea why.

image

Does this formula work instead?

(DOB-(year(DOB)*365.25)+(year(now)*365.25)+.5)

Was off by 1 day in some cases for me.

let dob = new Date(p1);

dob.setFullYear(new Date().getFullYear());

const options = {year: 'numeric', month: 'long', day: 'numeric' };

return dob.toLocaleDateString('en-US',options)

Needed JS to help with this, but if you want some extra things like “Days left until the next birthday” then maybe we need to work more.

2 Likes

Ya…I thought the +.5 would have fixed it…for some reason my original formula was resulting in some dates being 6 hours earlier. Back to the drawing board.

1 Like

Hello,
I also had the same problem on some dates and ended up using @Dilon_Perera method explained above by isolating the birth day, birth month, and recomposing the birthday date with the year in course with a Template column. I don’t know if I’m clear :wink:

1 Like

image

There’s an odd case with Feb 29 though (when you try to combine a Feb 29 date in a year that doesn’t have it). JS handles that automatically, so if you want to use the result to calculate it will work.