Click to See Complete Forum and Search --> : Rounding up the first Decimal place to make an integer.


chongzilla
May 16th, 2011, 04:56 PM
Hi,
I'm parsing through tags and looking at their values. I am getting a string that is a decimal for data that needs to be an integer.

I have the value 2.5. It is a string. I need the five to be rounded up and the decimal removed.

I tried :
<xsl:value-of select="format-number(./value, '####')"/>

but I get:
2

How do I get the 2.5 to round up to a 3? I thought it would be simple, but I couldn't google it.

Thanks,
Stan