Using VbScript::

I have a list of several different prices and I'm trying to figure out how to round these 5 decimals adding zeros if necessary.

For example:

I want
2.84
3.1
4.896

to look like
2.84000
3.10000
4.89600

Can somebody please help me? Thanks!

Dim num1 As Double = 2.8399999999999999
		Dim num2 As Double = 3.1000000000000001
		Dim num3 As Double = 4.8689999999999998

		Debug.WriteLine(num1.ToString("F5"))
		Debug.WriteLine(num2.ToString("F5"))
		Debug.WriteLine(num3.ToString("F5"))

Retruns:
2,84000
3,10000
4,86900

Thanks to all the responses. I used

formatnumber(2.84, 5)

made it look like 2.84000

Again appreciate all the help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.