Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formatting numbers and splitting decimal into integer and decimal

Status
Not open for further replies.

Toe

Programmer
Oct 26, 2001
71
0
0
GB
is there any way in an XSL of saying 'output this value to x decimal places?'

for example, when doing a <xsl:value-of select=&quot;$fred&quot;>

on another note is there any way of splitting off the integer and decimal components so that you could say one variable = the whole part and one variable=decimal part.

thanks
 
hi,

for integer part use xsl:number, for decimal part, find the lenght of the string and place the decimal places in a required position.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top