How to create birthday=today condition in Journey? | Adobe Higher Education
Skip to main content
Level 2
April 3, 2023
Respondido

How to create birthday=today condition in Journey?

  • April 3, 2023
  • 1 resposta
  • 1377 Visualizações

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%}
 
Este tópico foi fechado para respostas.
Melhor resposta por PandiyarajanRa1

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))

1 Resposta

Manoj_Kumar
Community Advisor
Community Advisor
April 4, 2023

Hello @pandiyarajanra1 

 

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
PandiyarajanRa1AutorResposta
Level 2
April 4, 2023

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))