Double division

Hi,
I am trying to divide double value1 with double value2 and assign it to a string.
Getting an error implicit conversion of double to long. What is the correct way of doing this? I am doing (dbl_val1\dbl_val2).ToString
Thank you so much,

hi @A_Learner

Can you try this one,

- Assign -> StrVar = (dbl_val1/dbl_val2).toString

Check the below screenshot,
image

You are using the reverse slash, change it to forward slash.

Hope it helps!!

@A_Learner,

Try like this.

outputString = CDbl(B/C).ToString

We will have to convert the output of the division explicitly to Double otherwise by default it will return Long Datatype.

Thanks,
Ashok :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.