Help what data type should I use when I have numbers or currency?

Hi here are my data,

7013.50
401.50
89.10

My desired output would be:

7,013.50
401.50
89.10

How ever when i get i check it the variable, it gets 7014 and 402.
It rounds up automatically, is it because im using string as datatype?
What datatype should I use to get the exact value?

THanks!

Hi,

Can you try the following?

image

Double.Parse(yourString).ToString("N2")

Regards,

1 Like

Thanks Yoichi! You’re a great help! :slight_smile:

1 Like

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