SSRS ROUNDING FUNCTION

wawaY 26 Reputation points
2021-10-04T06:19:09.88+00:00

I want to round down this value 92,506.04 to 92,506.00?

How to do this?

VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,658 questions
{count} vote

Accepted answer
  1. Jack J Jun 24,491 Reputation points Microsoft Vendor
    2021-10-04T08:28:24.267+00:00

    @wawaY , you could try the following code to get the value you wanted by using FormatNumber and Math.Round method.

    Code:

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click  
      
            Dim result = FormatNumber((Math.Round(92506.04, 1, MidpointRounding.AwayFromZero)), 2)  
            MessageBox.Show(result.ToString())  
        End Sub  
    

    Result:

    137362-image.png


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful