My app is a membership directory and I am trying to show upcoming birthdays of the members. I had added the following constraint:
This will show all the upcoming birthdays (regardless of year which is what I want) but it sorts them according to the year and not month / day.
Does anyone have any suggestions on how to sort it by month / day and not year. Or is there a better way to approach this. Thanks!
You’re on the right path, just need a bit more setup. As you set this up, you need to have a secondary filter to filter out the birthdays that are greater than the current date.
I have a lesson on LearnTo that covers this concept. Video of the lesson embedded below.
Dan, thanks for your response and the demo. When I added the constraint the constraint from your video (changing “is” to greater than / equal because I am looking for all of the birthdays after the current date) it gives me the birthdays on the same date of the upcoming months (i.e. September 29 (today’s today), October 29, November 29)
How can I include all of the birthdays? My previous constraint would include all of the upcoming birthdays but it would not order them correctly. It would ordered by year and not the month and date. Thanks for your time!
Ah, thanks for clarifying. The approach I recommended is only for showing the birthdays that match the current day (ie. born on this day).
In your case, I remember the frustration on the secondary sort of dates and then months, albeit it was a while back. I believe what I did was to save two dates in the database (one of actual birthday, including the year; the other with a normalized fixed birth year for all users).
With that approach, the tradeoff is that you’re creating duplicative information in the database, but you can more easily return the desired list without advanced filtering.
Readily welcome hearing from others if there’s a solution they’ve employed.
Thanks, Dan, for your help.
I went with the two dates in the database approach and that seems to have solved the problem and provided what I was looking for. Thanks again!
This topic was automatically closed after 70 days. New replies are no longer allowed.