FinTheHuman Posted January 3, 2019 Report Share Posted January 3, 2019 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? Thank you in advance ! Quote Link to comment Share on other sites More sharing options...
0 Aether Posted January 3, 2019 Report Share Posted January 3, 2019 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~ Quote Link to comment Share on other sites More sharing options...
0 IamGroot Posted January 3, 2019 Report Share Posted January 3, 2019 Hi @FinTheHuman, I found a similar Forum post, check this out: In this process, they are using a Calendar DataPage. Regards, IamGroot Quote Link to comment Share on other sites More sharing options...
0 Aether Posted January 3, 2019 Report Share Posted January 3, 2019 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~ Quote Link to comment Share on other sites More sharing options...
0 ManokNaPula Posted January 8, 2019 Report Share Posted January 8, 2019 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! Aether and FinTheHuman 2 Quote Link to comment Share on other sites More sharing options...
0 FinTheHuman Posted January 8, 2019 Author Report Share Posted January 8, 2019 Thank you for the help guys I really appreciate it Quote Link to comment Share on other sites More sharing options...
0 ManokNaPula Posted January 15, 2019 Report Share Posted January 15, 2019 You can refer to this link to better understand DateDiff functions: https://howto.caspio.com/faq/reports-datapages/calculated-fields-and-datediff-function/ Quote Link to comment Share on other sites More sharing options...
Question
FinTheHuman
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?
Thank you in advance !
Link to comment
Share on other sites
6 answers to this question
Recommended Posts
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.