- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
11-24-2021 11:08 PM
Hi,
I will push a date from the source to Tealium. In Tealium, I want to subtract 4 days from that date and get that output as date. And then I want to compare the date from the output with the current date. Is this possible to do?
Thanks,
Magesh
11-29-2021 09:44 AM
Hi @Mageshsm
So do do that you can use this logic:
Step | Attribute Name | Attribute Type | Default Value | Enrichment |
1 | vNumZero | Number (Int) | 0 | |
2 | vNum60000 | Number (Int) | 60000 | |
3 | vNum4DaysMS | Number (Int) | 345600000 | |
4 | vDtEpoch | Date | Set Date to vNumZero | |
5 | vDtNow | Date | (The base date you want to use) | |
6 | vNumNowEpochMin | Number (Int) | Set Number to be the difference between vDtEpoch and vDtNow in minutes | |
7 | vNumNowEpochMS | Number (Int) | Set Product to vNumNowEpochMin multiplied by vNum60000 | |
8 | vNumNowMinus4DaysEpochMS | Number (Int) | Set Difference to vNumNowEpochMS minus vNum4DaysMS | |
9 | vDtNowMinus4Days |
Date |
Set date to vNumNowMinus4DaysEpochMS
|
Just to note you may need to use the attribute search tool which is the pop-out icon to find number attributes when on the Date enrichments.
Adrian
Copyright All Rights Reserved © 2008-2023