I run a query and all my numbers are coming out to 5 decimal points:
for example –
156713.55000
2103613.03000
2080.08000
is there a simple piece of code I can add into my code so the ‘Cost’ table results are to 2 decimal points?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Following example will help you.
With rounding:
Without rounding:
or
Use
Str()Function. It takes three arguments(the number, the number total characters to display, and the number of decimal places to displaydisplays: ‘ 12345.679’ ( 3 spaces, 5 digits 12345, a decimal point, and three decimal digits (679). – it rounds if it has to truncate
for a Total of 12 characters, with 3 to the right of decimal point.