I am building an app that details our payroll changes using a Sharepoint List. One of the things my employer does is give everyone an admin day for their birthday, BUT to get the admin day for your birthday, the day & month of your birthday has to be before the day & month of your hire date.
Currently, I have a gallery detailing the details of the employee. I thought it would be kind of cool to add a cake emoji next to the employees in the gallery who get an admin day. I understand how to add the emoji, but I am not sure how to compare the dates.
The dates in the gallery are formatted dd/mm/yyyy, but I only need to compare the day and months of the two dates.
For example:
Name Hire Date DOB
Employee A 🎂 05/06/2022 01/08/1980
Employee B 02/14/2022 02/01/1992
Employee C 🎂 03/25/2022 11/19/1990
In the example, Employee A and Employee C would both get the admin day because the day & month of their birthday is less than the day & month of their hire date.
How would I do this?
Thanks!