Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - format-number >Thread Next - Re: format-number Re: format-numberTo: NULL Date: 9/3/2004 6:37:00 PM Hi, Use the format-number() function as suggested in your posting subject, e.g. If you want 4 fixed decimal places... <xsl:value-of select="format-number(LastPrice,'0.0000')" /> If you want a maximum of 4 decimal places... <xsl:value-of select="format-number(LastPrice,'0.####')" /> However, this will round to the nearest, i.e. 1.1234999999999 will be shown as 1.1235 So if you want to always round down you will have to floor it yourself, e.g. <xsl:value-of select="format-number(floor(LastPrice * 10000) div 10000,'0.0000')" /> HTH Marrow http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger) http://www.topxml.com/Xselerator "Saulot" <saulot@l...> wrote in message news:41386ee4$0$29651$636a15ce@n...... > Hi, > Got this : <xsl:value-of select="LastPrice" /> > > How can I tell my XSL I want the result with 4 digit max. (ie : 1.1234 and > not 1.1234999999999) > > Thks for help. > > | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
