Calculating Age from Embedded Data DOB

a_meiraa_meira Lisbon, Lisbon, PortugalCommunity Member Qubie ✭

Calculating Age from Embedded Data DOB

Hi everyone,

I've seen many different custom codes for calculating Age from DOB question from Qualtrics Library. However, I haven't found one for calculating it from a embedded data field.

Yes, if I already have the date of birth I could calculate the age of the respondent, but we would have to re-do the integration, which is not possible ATM.

Truth to be told, I won't use it as filter for respondents, as I already receive only clients who are over 18. But I have to create a graph in the CX Dashboard with the respondents by age range. As calculations with dates are not possible through the custom metrics functionality, I figured this was the only way.

Best regards!


  • JenCXJenCX Broomfield, COCommunity Member Wizard ✭✭✭✭✭

    I have found that it's possible to use math operations on embedded data date values only if the the date is in the YYYYMMDD format.

    In this case, you simply use math operations like normal. In this example, I'd imagine you'd do (CurrentDate - DateOfBirth)/365 and round it up to 0 decimals.

Sign In to Comment