Start Free Trial

Alteryx Designer Desktop Discussions

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

Datediff Cutting Off Decimal Points.

knobsdog
8 - Asteroid

I have a workflow where I calculate the difference between two dates and it will result in decimal places up to 9 decimal places, ie 199.365248361  I have created a formula to do that but when I change the data type to fixed decimal 19.9 it just shows 199.000000000  How can I get it to show correctly?  I've tried change the data types to every option in the select statement but nothing worked.  There are cross tabs and summarizes I need to run using this data and it's throwing off the totals downstream.  

 

I've included a dumbed down but accurate mock up of the section of workflow I'm referencing.

3 REPLIES 3
echuong1
Alteryx Alumni (Retired)

The rounding is occurring because of the units you've chosen - days. It will round to the nearest whole number. I adjusted the values to be in seconds, and then used a division to get days. This can of course be combined to one formula as well, I separated for clarity.

 

Hope this helps!

 

echuong1_0-1611245668136.png

 

messi007
15 - Aurora
15 - Aurora

@knobsdog,

 

Please see below:

messi007_0-1611245937938.png

Below the final result:

 

messi007_1-1611245976395.png

Hope this helps!

 

Attached the workflow,

Regards,

knobsdog
8 - Asteroid

These both work, thank you guys for the quick reply and the informative answer.  Makes sense and I'll adjust my formula.

Labels
Top Solution Authors