Round Down a double number

Hi
I am currently performing a caluclation where I want to round down to the nearest number regardless of how close it is the number above .

IE: Calculation Result is 1.98732 , should round down to 1 .

I have tried the following examples below but they all Round up to 2 .

NumberValue = 1.98

  1. Rounding
    Math.Round(NumberValue) = 2

  2. Formatting
    NumberValue.ToString(“0”) = 2

  3. Convert to Int
    Convert.ToInt32(NumberValue) = 2

Any help would be greatly appreciated .

Thanks in advance
Rachael

1 Like

Hi @rachael.sherry ,

Try Math.Floor(NumberValue)

image

Cheers
@rachael.sherry

2 Likes

Hi @Pradeep_Shiv

That worked perfectly .

Thanks very much for your help :slight_smile:

Have a great Thursday :slight_smile:

Regards
Rachael

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