Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6539281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:50:24+00:00 2026-05-25T10:50:24+00:00

I have decimal currency amounts (from SQl2k* tables as 32,8) and I would like

  • 0

I have decimal currency amounts (from SQl2k* tables as 32,8) and I would like to round them to Millions with 2 decimal places.

The system will be displaying 1000s of rows with multiple amounts in them, and I need to summarise the totals for various categories into a “quick view”.

e.g.

123,456,789.12345678
goes to
123.46

6,655,443,332.2110099
goes to
6,655.44

etc

I know there are issues with rounding and decimal/floating point math:

45,454,454.454545
goes to
45.46 OR 45.45 ?

so also any advice on what’s best to use would also be very much appreciated.


Two more examples (of what I’d EXPECT…not what might actually be mathematically correct!)

555444444.444444 => 555.44
555444444.444445 => 555.45

I would expect the final “5” of the second example to cascade up to the decimal place?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:50:24+00:00Added an answer on May 25, 2026 at 10:50 am
    decimal d = Math.Round(inValue/1000000m, 2);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My (MySQL) tables have columns with currency values set as Decimal(10,2) with decimals separated
I've got some entities which have decimal properties on them. These entities' properties are
I have a number formatter set up to convert currency strings to decimal values.
I'm using SSRS 2008 and I have a financial report. I would like the
I have next code: static void Main(string[] args) { byte currency; decimal amount; if
I have the need to format a decimal number as currency but I do
Usually when I have need to convert currency string (like 1200,55 zł or $1,249)
I don't want a currency symbol, but I have values like; 4900 4900 4900
Here's what I have: decimal sum = _myDB.Products.Sum(p => p.Price).GetValueOrDefault(); I also have two
I have a decimal number (let's call it goal ) and an array of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.