grails - formatting numbers as currencies -


I used the g: formatNumber tag to format a number as currency

  & lt; G: formatNumber number = "$ {it.price}" type = "currency" currency CODE = "$ {it.currency}" />   

This prints a formatted number such as

GBP6.87

Is there a way that I can customize Can I do this? Specifically, I would like to be a place between currency names and zodiac sign, i.e.

GBP 6.87

You can specify your own format string which you want.

  & lt; G: formatNumber number = "$ {myNumber}" format = "your format is here" />   

See and

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -