How to select only up to 3 decimal place with out round of the given value? [Resolved]

Posted by Mahe under C# on 9/26/2012 | Points: 10 | Views : 1260 | Status : [Member] | Replies : 1
Hi All,


How to select only up to 3 decimal place with out round of the given value?

ex: For the number 1234.231231
i want 1234.231

Regards,
Mahe




Responses

Posted by: Ajayk3 on: 9/26/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
double d = 1234.231231;

double dd = Math.Floor(d * 1000) / 1000;

Mahe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response