On 9 March 2011 16:10, ABHILASH M.A <[email protected]> wrote: > Günther Lackner wrote in post #756895: >> Hi! >> >> I need to calculate the difference between two Datetime and convert it >> into minutes. >> >> diff = Time.now() - my_date
ruby-1.8.7-p302 > t1 = Time.now => Wed Mar 09 16:24:09 +0000 2011 ruby-1.8.7-p302 > t2 = Time.now => Wed Mar 09 16:24:22 +0000 2011 ruby-1.8.7-p302 > t2 - t1 => 12.607967 The difference is in seconds. I think your my_date variable is not a Time or DateTime object. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

