Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

ToNumber Conversion Error

6 - Meteoroid

I am adding two ToNumbers() and want to divide the result by a constant. Can someone help?

 

The statement does not give me the division by 60

 

(ToNumber([Hour1]) + ToNumber([Minute 1])) /60 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner
1hour + 30minutes do you want the answer to be 1.5 or .52?

If you output to a double you're getting an unrounded version of 31/60.

Try

ToNumber([Hour1]) + ToNumber([Minute 1]))/60

Cheers,

Mark
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
6 - Meteoroid

I have fields Hour1 and Minute which gives me say 13 Hrs and 45 minutes.

I want to calculate 13+45 / 60 = 58/60 = .96

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @mbangalore 

 

I tried with two versions, first using RegEX and second only ToNumber function and they worked perfect.

 

2 Solutions.PNG

 

Cheers,

Labels