Expand my Community achievements bar.

Adobe Journey Optimizer Community Lens 6th edition is out.
SOLVED

How to create birthday=today condition in Journey?

Avatar

Level 2

We created the segment with birthday attribute = today where we found the sample profiles shows only shows previous day instead of today. So we want to put the below statement inside the condition node. 

#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate} == toDateOnly(now())
 
But, it is not giving us the right result. do we able to do ignore year in the condition level advanced editor?
In Json, we can use the below code to find the birthday accurately. Because, we dont have any function for getMonth and currentMonth kind of functions in Condition node in Journey.
 
{%#if profile.person.birthDate.getMonth() = currentMonth() and profile.person.birthDate.getDayOfMonth() = currentDayOfMonth() %}Happy Birthdate{%else%}No birthdate today{%/if%}
 
1 Accepted Solution

Avatar

Correct answer by
Level 2

Thanks Manoj, we got the correct code to check the comparison of birthdate with today's date. please find the below code for other's reference too. 

 

concat(substr(toString(now()),8,10),substr(toString(now()),5,7))==concat(substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),8,10),substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),5,7))

View solution in original post

2 Replies

Avatar

Community Advisor

Hello @gengaipandi11 

 

Try using this to get the day and month from the current date.

concat(substr(toString(now()),8,9),substr(toString(now()),5,6))

 


     Manoj
     Find me on LinkedIn

Avatar

Correct answer by
Level 2

Thanks Manoj, we got the correct code to check the comparison of birthdate with today's date. please find the below code for other's reference too. 

 

concat(substr(toString(now()),8,10),substr(toString(now()),5,7))==concat(substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),8,10),substr(toString(#{ExperiencePlatform.ProfileFieldGroup.profile.person.birthDate}),5,7))