• 0

# Display Birthday Message

## Question

Hello Everyone !

I want to display "It's your Birthday !" or "Happy Birthday to you !"  when the current date is match with the user's Birthday.

Can anyone help me with this?

## Recommended Posts

• 0

Hello @FinTheHuman,

If you are using a report DataPage to display the Birthday message, then you can use calculated field with formula to generate the message you wanted.

You can try using this formula:

```CASE

WHEN Datediff(Month,[@field:Birthday],GetUTCDate())=0 AND Datediff(Day,[@field:Birthday],GetUTCDate())=0 THEN 'Happy Birthday to you!'

ELSE 'Not your birthday yet !'

END```

For further instruction, you check this documentation: Calculated Field

I hope this helps

~WatashiwaJin~

##### Share on other sites

• 0

Hi @FinTheHuman,

I found a similar Forum post, check this out:

In this process, they are using a Calendar DataPage.

Regards,

IamGroot

##### Share on other sites

• 0

Hi @FinTheHuman,

This is also might be helpful to you, the report will display the days remaining before the user's birthday.

```CASE

WHEN Datediff(Month,[@field:Birthday],GetUTCDate())=0 AND Datediff(Day,[@field:Birthday],GetUTCDate())=0 THEN 'Happy Birthday to you!'

ELSE CONVERT(VARCHAR(10), Datediff(Day,[@field:Birthday],GetUTCDate()), 101) + " days, before your Birthday"
END```

I hope this helps

~WatashiwaJin~

##### Share on other sites

• 0

Just to add to the previous comment, I just noticed this recently,

When a Field for Birthdate is equal to, say December 2018, and it is now January 2019, using "Datediff(Year,[@field:Birthday],GetUTCDate())" as a formula would give me a "1 year" as result, when in fact it should not. I guess it's because I used "Year" as the DateDiff option.

What I did was "Datediff(Month,[@field:Birthday],GetUTCDate())/12", it did somehow responds to the age correctly, but when my birth month comes, it adds to my age. I can accept that tho.

So just in case someone encounter the same problem, I hope this helps!

##### Share on other sites

• 0

Thank you for the help guys  I really appreciate it

##### Share on other sites

• 0

You can refer to this link to better understand DateDiff functions:

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.