views:

173

answers:

3

hi, i have a double, the decimal place isn't fix (8-?)

i want to fix the decimal place to six (for example: 1,234567).

this is my double:

CStr(score)

i guess it's quiet simple :P

+2  A: 

Try this instead:

score.ToString("0.000000")
Jakob Christensen
greate it works
Tyzak
A: 

You can also Math.Round(3.44, 1) 'Returns 3.4.

Math.Round

SetiSeeker
A: 

After Decimal point Add Zero's like this

Dim tot as String
Dim totAmt as Double
totAmt=10.10
tot=String.Format("{0:00.000}", totAmt)
OutPut: 10.100

After Decimal point Remove Zero's like this

totAmt=10.750
tot=Math.Round(totAmt,2)
Output:10.75

Sloved

Arunkumar