[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Bober

11/28/2007 5:12:00 PM

Hello,
In my application form db I become double,
for example 10 => 10.00 or 10.2 => 10.20

id it possible?
Is there any function in Rails to it?

1 Answer

Jose francisco Gonzalez carmona

11/28/2007 6:25:00 PM

0

Bober wrote:
> Hello,
> In my application form db I become double,
> for example 10 => 10.00 or 10.2 => 10.20
>
> id it possible?
> Is there any function in Rails to it?

Pure ruby:

puts "%02.02f" % 10
puts "%02.02f" % 10.2
--
Posted via http://www.ruby-....