This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: decimal points


Hi Subbu,

> i wana format $num which is a floating point num in such a way that
> i only have exactly 3 digits after decimal point..
> any help
> i used format-num() but it is rounding off

I guess you mean that you're using format-number(). The following
should work:

  format-number($num, '0.000')

If there's more than three decimal places, format-number() will round
to three decimal places; if there's less, it will add 0s to make it up
to three.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]