Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Date Calculation from Text String

jay_hl
7 - Meteor

I have the following date format in a field which is formatted as "27 year(s), 0 month(s), 19 day(s)", and a second field called Dataset Date which shows "2025-09-16".

 

Can someone help me with a Formula that calculates the date (in yyyy-mm-dd date format) that was "27 year(s), 0 month(s), 19 day(s)" ago?

 

Regards

 

Jay

2 REPLIES 2
davidskaife
14 - Magnetar

Hi @jay_hl 

 

Here is one way of doing it. First you need to parse out the numbers for year, month, and day using Regex and Tokenize, then in one large formula subtract each section from your date - years first, then months, then finally days:

 

davidskaife_0-1758799188874.png

 

 

dreldrel
8 - Asteroid

You can use a regex tool or formula tools to parse your data first, then you can use a datetime tool to convert it back to the dateime format

Labels
Top Solution Authors