Hi all,
I have a dataset from which I want to extract ages from dates. An example of how my database looks is:
Part | Date Purchase | Date Installed | Date of First Use | Age at 27/02/23 |
Engine | 01/01/2000 | |||
Gearbox | 04/02/2013 | |||
Tyre #3 | 13/03/2022 | |||
Seatbelt #5 | 03/06/2021 |
And I want Alteryx to calculate ages in decimals so that my output looks like this:
Part | Date Purchase | Date Installed | Date of First Use | Age at 27/02/23 |
Engine | 01/01/2000 | 23.15 | ||
Gearbox | 04/02/2013 | 10.06 | ||
Tyre #3 | 13/03/2022 | 0.96 | ||
Seatbelt #5 | 03/06/2021 | 1.73 |
I want to do this for multiple dates - e.g., a column for age at 27/02/2023, 01/06/2023 and 10/12/2023.
Could someone please show me how to do this in Alteryx?
Thanks in advance!
Solved! Go to Solution.
Hi @eleee3
Here's an example using the datetimediff function. I found the age in days and divided by 365, so there would be some margin of error due to leap years - hopefully this give you a good idea though!
That's great, thanks so much, @Luke_C!