On Sun, Jan 18, 2009 at 04:27, Marcus <pr...@wordit.com> wrote: > Is there a way to format numbers? > If I have a form variable "1.5", is there a way to add a zero *only* > if the variable has one digit after the decimal point? > > 1.5 becomes 1.50 > 1.54 stays as 1.54 >
Hi, The http://www.pmwiki.org/wiki/Cookbook/MarkupExprPlus recipe offers the 'sprintf' function which could be used as: {(sprintf "%1.2f" 1.5)} Regards, Dominique _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users