[ic] converting to 2 decimal places problem

Stefan Hornburg interchange-users@icdevgroup.org
Mon Nov 25 07:48:01 2002


On Mon, 25 Nov 2002 11:57:25 -0000
Dion Jones <Dion@smallislandtrader.com> wrote:

> I currently have this code:
> 
> 	[calc][item-field height]/2.54[/calc] inches
> 
> to convert my Cm into inches and output it on a page but this produces a
> crazy amount of decimal places.  how can I get it down to just 2dp?

[calc]sprintf("%.2f",[item-field height]/2.54)[/calc] inches

Ciao
   Racke