Click here to Skip to main content
15,910,130 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Iam getting a problem in Round Function

Round(362.645,2) is giving 362.64
instead of 362.65
how to solve this
Posted
Updated 17-Sep-14 16:35pm
v2
Comments
george4986 17-Sep-14 23:24pm    
no its returning 362.650
try select Round(362.645,2) on ur sql server.

you can use ceiling: see here[^]
 
Share this answer
 
Quote:
Round(362.65,2) is giving 362

Are you sure? From the documentation it should return 362.65 (of course if you cast this result to int then you get 362).
 
Share this answer
 
Hi,


Check this...

SQL
SELECT Round(CONVERT(DECIMAL(10,2),362.64512),2)


Hope this will help you.

Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900