- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
10-23-2019 04:56 AM
I have an offline event firing into Tealium via the HTTP API – not through TIQ.
I’m able to capture DOB from that and use it to set a date attribute but I’d like to use that to calculate age.
Without having an option such as javascript’s date.now(), I’m not sure how to go about doing this.
Any help from the hive mind would be amazing.
Solved! Go to Solution.
10-24-2019 01:18 PM - edited 10-25-2019 04:31 AM
Hi @PhilipWright ,
That can be accomplished, however there is a caveat.
Try the following:
This gives you the correct years, however the caveat is that its a floating point and therefore it will have decimals.
09-06-2023 08:45 AM - edited 09-06-2023 08:46 AM
Hi @ruipedromachado , I am trying to use the same setup. One questionn, how do you test if the age is being calculated?
09-06-2023 10:04 AM
Hi @ruchit0622
Steps:
You should see something similar to my screenshot.
PS: Tealium as since then added the "Integer" option to the Number attribute. Might want to use that one instead as it might provide the age without the decimal value.
09-06-2023 10:22 AM
Copyright All Rights Reserved © 2008-2023