Expandir minha barra de realizações na Comunidade.

Join us on September 25th for a must-attend webinar featuring Adobe Experience Maker winner Anish Raul. Discover how leading enterprises are adopting AI into their workflows securely, responsibly, and at scale.
SOLUCIONADO

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 Solução aceita

Avatar

Resposta correta de
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))

 

 

Ver solução na publicação original

3 Respostas

Avatar

Resposta correta de
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