Hi
We have value 146064.000000 . We want to remove 3 decimals from right side after decimal.
Value should be 146064.000
Thanks
Hi
We have value 146064.000000 . We want to remove 3 decimals from right side after decimal.
Value should be 146064.000
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh KumarPosted Feb 4, 2024, 10:49 AM
Hello ramco,
You can do it in multiple ways, please find below examples,
Tuhin PaulPosted Feb 3, 2024, 8:58 AM
If you want to remove three decimal places from a given number in many programming languages, you can achieve this by converting the number to a string and then formatting it according to your needs. Below are examples in several common programming languages:
JavaScript:
C#:
Choose the code snippet corresponding to the programming language you are using. These examples use string formatting to achieve the desired result by limiting the number of decimal places and then removing trailing zeros and the decimal point. Adjust the code as needed for your specific requirements and programming environment.
Naimish MakwanaPosted Feb 3, 2024, 4:54 AM
You can use the
ROUNDfunction in SQL to round a number to a certain number of decimal places. Here is how you can do it:In the above SQL statement, replace
your_columnwith the name of the column that contains the value you want to round, andyour_tablewith the name of your table. This will round the values in the specified column to 3 decimal places.Thanks