I’m stuck trying to set up a birthday reminder system in my Notion database. The problem is I can’t turn text into proper dates.
Here’s what I’m trying to do:
- Make a list of upcoming birthdays for the next month
- Use actual birthdates when I know them
- Use just the day and month for others, with this year as a placeholder
The tricky part is Notion’s filters work with dates, not anniversaries. So I need to change birthdays into dates for this year.
I’ve managed to create the right text format, but Notion won’t treat it as a real date. I tried using formatDate
like this:
formatDate(join(prop('BDay'), ', ', prop('CurrentYear')), 'MMM D YYYY')
But I get an error saying the input isn’t a date. Looks like formatDate
only works on existing dates, not text.
Does anyone know how to turn text into a date in Notion? I’m out of ideas here. Help would be awesome!
I’ve tackled a similar issue in Notion before.
The key is to use the date()
function instead of formatDate()
. Here’s a formula that should work for your birthday reminder setup:
date(join(prop('BDay'), ', ', prop('CurrentYear')))
This converts your text into a proper date format that Notion can filter and sort. Make sure your ‘BDay’ property is in the format ‘MMM D’ (for example, ‘Jan 15’) for this to work correctly.
For birthdays where you only know the month and day, using the current year as a placeholder works well. This approach allows you to generate a dynamic list of upcoming birthdays that updates automatically each year. Adjust your filter to display birthdays within the next 30 days for your monthly view.
I hope this helps solve your birthday reminder challenge!
I’ve grappled with this exact problem in Notion before. What worked for me was a combination of the date() and dateAdd() functions. Here’s the formula I ended up using:
date(dateAdd(date(prop(‘CurrentYear’), 1, 1), prop(‘BDay’) - 1, ‘days’))
This assumes your ‘BDay’ property is a number representing the day of the year (1-366). If it’s not, you might need to adjust the formula slightly.
The trick is to start with January 1st of the current year, then add the number of days until the birthday. This method handles leap years automatically, which is a nice bonus.
For the birthdays where you only know month and day, you can use a separate formula to convert those to day-of-year numbers. It’s a bit complex, but it works reliably.
Hope this helps you get your birthday reminder system up and running!
hey there! have you tried dateAdd()? you can try: dateAdd(date(prop(‘CurrentYear’),1,1), prop(‘BDay’), ‘days’). assumes BDay is e.g. ‘31’ for jan31, so may need tweaking. good luck!