내 커뮤니티 업적 표시줄을 확대합니다.

Join Adobe Journey Optimizer product experts for a live Ask Me Anything on October 15th at 8 AM PT about Expanding Your Mobile Reach with RCS & WhatsApp in AJO!
해결됨

Getting Age field

Avatar

Level 1

Hi,

Using Arithmetic function to calculate the age from Date of Birth field we are getting the below error.

How can we get the age calculated in AJO? attaching the screen shot of the error

 

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Employee Advisor

You can use the following snippet as a reference 

 

((((toInteger(substr(toString(now()),0,4))) - 
(toInteger(substr((#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.personExtn.birthDateStr}),0,4)))) <= 40))
and
((((toInteger(substr(toString(now()),0,4))) - 
(toInteger(substr((#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.personExtn.birthDateStr}),0,4)))) >= 18))

 

 

원본 게시물의 솔루션 보기

3 답변 개

Avatar

정확한 답변 작성자:
Employee Advisor

You can use the following snippet as a reference 

 

((((toInteger(substr(toString(now()),0,4))) - 
(toInteger(substr((#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.personExtn.birthDateStr}),0,4)))) <= 40))
and
((((toInteger(substr(toString(now()),0,4))) - 
(toInteger(substr((#{ExperiencePlatform.ProfileFieldGroup.profile._tenant.personExtn.birthDateStr}),0,4)))) >= 18))

 

 

Avatar

Level 1

@Mohan_Dugganab Thanks for the reply. can we get the age value so it can be exported externally?

Avatar

Employee Advisor

You can actually write the value of this expression using update profile activity into one of the existing attributes on profile (say age) and then use it for exports 

 

Kindly take a note of the below - https://experienceleague.adobe.com/en/docs/journey-optimizer/using/orchestrate-journeys/about-journe... 

dugganab_0-1716536268034.png

If you would like this to be handled as part of data load itself, you may want to explore data prep functionality https://experienceleague.adobe.com/en/docs/experience-platform/data-prep/home