web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Rounding to 2 decimal digits i

(0) ShareShare
ReportReport
Posted on by 90

I want to get the amount with vat with two decimal digits but without rounding for example if i have 8521.0055 i want to get 8521.00 

I did some search and found that I can use format for that but it keeps giving me error.

Can someone help me with that 

I have the same question (0)
  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi muaz deyab ,

    Please try below rounding function.

    ROUND(8521.0055,0.1)

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Also please try below

    FORMAT(ROUND(8521.0055,0.1),0,'<Precision,2><sign><Integer Thousand><Decimals,3>')

    Thanks.

  • muaz deyab Profile Picture
    90 on at

    this will return a text right?

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Yes it will return as a text

  • muaz deyab Profile Picture
    90 on at

    Thanks for ur answer it really helped me but when i enter 8521.3160 it gives me 8521.32 i want to get the exact same two decimal digits (8521.31).

    So I converted the Total Amount to text then deleted everything after two decimal digits

               TxtAmount := Format(TotalAmount);

               POS := StrPos(TxtAmount, '.');

               Evaluate(AmountWithVAT, TxtAmount.Remove((POS + 3)));

    this is the code

    and thank you for your answer again

  • Suggested answer
    Nitin Verma Profile Picture
    21,698 Moderator on at

    Hi muaz deyab ,

    As per the code I sent it will always round the values by seeking its decimal places, means it will increase or decrease accordingly, but as you said you want exact same 2 decimal values, in that case you have to use below logic

    TextVal := FORMAT(8521.3160);

    IF STRPOS(TextVal ,'.') > 0 then

     TextVal := COPYSTR(TextVal,1,STRPOS(TextVal,'.')) + COPYSTR(TextVal,STRPOS(TextVal,'.')+1,2);

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans