tags:

views:

63

answers:

1

I have an object - call this "order" This object has a property - Total. This is type - decimal (it's a money value)

In my template i have something like:

Order Total: $order.Total GBP

However, in the resulting merge, it comes out as:

Order Total: 3.4000 GBP

for 3.40

Is there any way of telling nvelocity to format it as 2 decimal places??

+1  A: 

I found it out:

Can use ToString("N2") for example:

Order Total: $order.Total.ToString("N2") GBP

alex