|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how can i convert 77.777777.. to 77.78 through xsl
hi
i m calculating percentages and getting the result with 16 decimal digits . How can i trim those digits with xsl example code <xsl:variable name="percentclassesattended" select="$classesattended*100 div $totalclasses" /> <xsl:value-of select="$percentclassesattended" /> output : 77.7777777777777777 (say) if any one knows plz help me. thanx wasif |
|
#2
|
|||
|
|||
|
There is a round function, but it only rounds to the integer, so you need to take your 77.77777 multiply by 100 to give you 7777.777, then round(), then divide by 100 to give you 77.78.
Cul |
|
#3
|
|||
|
|||
|
Thanx a lot Culland
The round () function worked. Regards Wasif |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > how can i convert 77.777777.. to 77.78 through xsl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|