Calling all Alteryx customers: Refer your colleague to try Alteryx and receive a $50 gift card. Sign up now!

Alteryx Designer Desktop Discussions

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

Turn Date into Numerical Value

missteran
7 - Meteor

Hi Alteryx Community - could someone please help - I have in excel a couple date columns.

One is "Period Date": 9/30/2024 12:00:00 AM

Another is "Maturity date" example: 01/15/2025

I want to calculate how many days in-between - example above being that there are 107 days until maturity. I'm having a difficult time converting a date into a numerical value to be able to calculate the days in between since I keep getting formula error that either the date is in a string format or in a date/time format, so a calculation is not working. Any thoughts here? Thanks

3 REPLIES 3
OllieClarke
15 - Aurora
15 - Aurora

Hi @missteran 

If you parse your date fields to a date format, and then change date types to date, you can use the datetimediff() function to find the difference in days between them
parsing the datesparsing the datesfull workflowfull workflow

There's more info on date parsing here: https://help.alteryx.com/current/en/designer/functions/datetime-functions.html

 

Hope that helps,

 

Ollie

nagakavyasri
12 - Quasar
missteran
7 - Meteor

Thank you both - solution has worked. And thank you for sharing the link Ollie

Labels
Top Solution Authors