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

@chukleswk 

 

getting nulls now..

 

wonka1234_0-1657223203126.png

befre:

 

wonka1234_2-1657223233529.png

 

 

after:

 

wonka1234_1-1657223220518.png

 

chukleswk
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

@chukleswk 

wonka1234_0-1657223817154.png

 

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

wonka1234_1-1657223844572.png

 

 

 

chukleswk
11 - Bolide

Change you date formula to: 

 

Capture.PNG

wonka1234
10 - Fireball

@chukleswk this seemingly works!

chukleswk
11 - Bolide

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

wonka1234
10 - Fireball

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

chukleswk
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