From: Logan Capaldo Date: 2005-11-03T05:25:43+09:00 Subject: Re: Newbie: How to format a number to always show two decimals? On Oct 31, 2005, at 7:21 PM, Harold Hausman wrote: > Alternatively there's this code from Phrogz's library ( > http://phrogz.net/rubylibs) which to me is more rubyish than sprintf. > Everytime you use sprintf, God kills a kitten. > > -Harold In that case... "%.2f" % 1.012345 => "1.01"