May 29, 2018 08:43 AM
I’m creating an employee directory and I’d like to have a record (cell) display an emoji or change colors one week before that person’s birthday. Has anyone figured out how to do that?
May 29, 2018 09:58 AM
Assuming you’ve created a DateOfBirth
(Or Birthday
, or Whatever
) this could work (I didn’t really test it) by adding formula field to your table:
IF(IS_SAME(DATEADD({DateOfBirth},-7,'days'),{DateOfBirth},'L'),"✅","")
If it works, the ’L’
can be change to your liking :winking_face:
The DATETIME_FORMAT function will allow you to reformat the data from the date-type field into a string of your specifications. This is written in the form "DATETIME_FORMAT(Datetime, 'format s...
May 29, 2018 10:28 AM
There are a lot of threads like this, the easiest way is using DATETIME_DIFF
function.
May 29, 2018 11:05 AM
Yes a Birthday column is created but unfortunately it didn’t work
May 29, 2018 11:12 AM
This is not quite so simple as the comments above seem to indicate due to the need to reconcile the date of Birth to the current year.
Is your Birthday
field a “Date” field (it includes the “Year” of birth), or is it a “Single Line Text” field that just has the month/day “5/29”?
May 29, 2018 11:19 AM
It’s a “Date” field MM/DD/YYYY.
I’m using the Employee Directory template and I wanted to add an additional column that would put an emoji.
Could it be that it’s not working because I’m on the free version?
May 29, 2018 11:23 AM
No, you can do this with the free version.
It’s just that, when you compare dates with a formula like DATETIME_DIFF()
, it’s going to take the year into account. You want to compare to that employees “Next Birthday”, not their actual “Birth Date”, to get a notification of “1 Week” until their Birthday. It’s just a little more involved, and there are actually a few different approaches you could take. I’m working on what might be the best approach right now.
May 29, 2018 11:28 AM
Yea I realized the year might have something to do with it when you mentioned it before. I really appreciate you taking some time to try and help!
May 29, 2018 11:29 AM
I’m sorry :confused: … I was too quick and distracted so I didn’t thought about everything :sweat: :confused: .
I’m leaving the space for the experts :winking_face: …
May 29, 2018 11:32 AM
Ok, next question -
In order to do this, I need to calculate the persons age, as well as the date of their next birthday. Would you like those to be explicit fields that you can see in your table, or would you like them wrapped up into a single field that just gives you a notification of their birth week?