How To Format Money / Decimal In XSLT



TODO:

Have you ever wanted to make a nice money string from a number in XSLT?

 

SOLUTION:

 

<xsl:variable name="MyMoney" select='format-number( round(100*$root/DollarString) div 100 ,"##0.00" )' />

 

NOTES:

This creates a nice formatted string in a variable, that can then be used later.



Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading