Double formated Decimal

Hi, I have a project that I have to format my result in double to decimal. I wanted you to help me how to do it.

Hi @tiagowt,
There are a couple of ways you can do this,

  1. Format the number as a decimal instead of a float, this is useful if you want to display it as a string/text
  2. Convert/cast it to an Int like so let intValueOfVariable = Int(doubleVariable)

cheers,

Hi @tiagowt,
I think you are not after creating an int, so what is your expected value? a sample would be helpful.

cheers,

This topic was automatically closed after 166 days. New replies are no longer allowed.