In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

DateTimeDiff, rounding help

wonka1234
10 - Fireball

Here is what I get in excel:

 

wonka1234_0-1657219244435.png

excel formula - =(V13-V11)/365.25

 

what im trying in alteryx:

DateTimeDiff([Maturity Date],[Run Date],"month")/12

 

wonka1234_1-1657219280444.png

 

but i am getting 7.0 . 

 

 

Is there a way to round this to get 6.50 like in excel?

 

 

 

 

 

 

 

17 REPLIES 17
wonka1234
10 - Fireball

@chuckleswk 

 

getting nulls now..

 

wonka1234_0-1657223203126.png

befre:

 

wonka1234_2-1657223233529.png

 

 

after:

 

wonka1234_1-1657223220518.png

 

chuckleswk
11 - Bolide

Can we get a browse so we can see what the output for the date from the dynamic rename looks like? Also, check that you are running a trim or a Data Cleansing tool to make sure that you don't have any leading / trailing whitespaces.

wonka1234
10 - Fireball

@chuckleswk 

wonka1234_0-1657223817154.png

 

whats interesting the header names do have spaces before i convert them:

wonka1234_1-1657223844572.png

 

 

 

chuckleswk
11 - Bolide

Change you date formula to: 

 

Capture.PNG

wonka1234
10 - Fireball

@chuckleswk this seemingly works!

chuckleswk
11 - Bolide

Glad to hear that. Did it produce the decimal point that you were looking for?

wonka1234
10 - Fireball

@chuckleswk  Yes it did! not sure why that format changed it though

chuckleswk
11 - Bolide

@wonka1234 It's because you are selecting the format that the input currently is in. You did a Custom format with mm/dd/yyyy which you could have done if you had used MM/dd/yyyy instead. The lowercase "mm" changed it to the first of the year.

Labels
Top Solution Authors