velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manish" <prol...@gmx.net>
Subject Re: Formatting price, decimals etc...
Date Tue, 26 Oct 2004 05:48:11 GMT

>
> > How can I format price, decimals etc in VTL?
> Try NumberTool.  ;)
>
http://jakarta.apache.org/velocity/tools/javadoc/org/apache/velocity/tools/g
eneric/NumberTool.html
>

Thanks! :)
I have another problem though, I am trying to format price, and this is what
I am using, but it puts decimal .00 in price which I do not want.
How can I have price such as - $100 instead of $100.00
$listprice itself is an integer.

I have tried -

$!num.format('currency', $listprice)
$!num.format('currency', $!num.format('integer', $p.listprice))

what can I do?

TIA,
- Manish



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message