Skip to main content
Level 2
Apr 12, 2023 8:43 AM UTC
Solved

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

@1961013 , @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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
ChetanyaJain-1
ChetanyaJain-1Accepted solution
Community Advisor
Apr 12, 2023 7:55 PM UTC

@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#:~:text=Computed%20attributes%20are%20functions%20used,segmentation%2C%20activation%2C%20and%20personalization.

 

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

9 replies

Anil_Umachigi
Adobe Employee
Adobe Employee
Apr 12, 2023 10:14 AM UTC

@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
Translate
SindheAuthor
Level 2
Apr 12, 2023 2:28 PM UTC

Doesn't this require Data Distiller license?

Translate
Anil_Umachigi
Adobe Employee
Adobe Employee
Apr 13, 2023 1:53 AM UTC

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

Translate
Level 3
Apr 12, 2023 1:47 PM UTC

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

Translate
Danny-Miller
Adobe Employee
Adobe Employee
Apr 12, 2023 4:31 PM UTC

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

 

 

Translate
ChetanyaJain-1
Community Advisor
ChetanyaJain-1Community AdvisorAccepted solution
Community Advisor
Apr 12, 2023 7:55 PM UTC

@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#:~:text=Computed%20attributes%20are%20functions%20used,segmentation%2C%20activation%2C%20and%20personalization.

 

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

Translate
sambhav-jain
Level 2
May 24, 2023 11:30 PM UTC

Hi Chetanya,

 

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

Translate
ChetanyaJain-1
Community Advisor
Community Advisor
May 25, 2023 12:15 AM UTC

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

Translate