Expand my Community achievements bar.

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.
SOLVED

Is it possible to calculate age from date of birth using Data Prep or inside a condition in a journey?

Avatar

Level 2

@Saurav , @Danny-Miller  There is a date of birth field in profile. The requirement is to create segments based on age. Is it possible to calculate the age from date of birth within AEP?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Sindhe, the computed attributes feature (in beta currently) will be super helpful in your case.

https://experienceleague.adobe.com/docs/experience-platform/profile/computed-attributes/ca-api.html#....

 

You can define a field "age" at the profile level, define the computation, and leave it. 

View solution in original post

9 Replies

Avatar

Employee

@Sindhe Data prep may not be right option here, assuming this profile dataset is not ingested on daily basis. Data prep runs only during data ingestion. 

One way i would think of doing this is 

  1. set a ageAsOfToday field in the schema 
  2. Run a query service job (scheduled every night) which updates this field for all profiles. 
  3. Use this field in segment which will be evaluated everyday with accurate age info

Avatar

Level 2

Doesn't this require Data Distiller license?

Avatar

Employee

@Sindhe Probably, depends on how your license is set up. 

Avatar

Community Advisor

Hi @Anil_Umachigi ,

stumbled upon this thread. Being fairly new to query service, have you come along an actual implementation on this specific query?

Cheers from Switzerland!


Avatar

Level 3

You can use data prep to calculate age but the this will not be recalculated unless you ingest the record again.
I would either, based on requirement, use Query Service or just create segments to qualify users in certain age groups

Avatar

Employee Advisor

@Sindhe Unless I'm missing something, if you have DOB, then the Segment uses Rolling Range to calculate age.

DannyMiller_0-1681317040962.png

 

 

Avatar

Correct answer by
Community Advisor

@Sindhe, the computed attributes feature (in beta currently) will be super helpful in your case.

https://experienceleague.adobe.com/docs/experience-platform/profile/computed-attributes/ca-api.html#....

 

You can define a field "age" at the profile level, define the computation, and leave it. 

Avatar

Level 3

Hi Chetanya,

 

The page link you shared is not accessible now. Please share the update link.

Avatar

Community Advisor

Hi @sambhav-jain, unfortunately, the page is taken offline. I believe this is a feature that is likely to be released in the future.