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
Solved! Go to Solution.
Views
Replies
Total Likes
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))
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))
@dugganab Thanks for the reply. can we get the age value so it can be exported externally?
Views
Replies
Total Likes
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...
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