From: Kirk Haines Date: 2011-03-10T01:35:10+09:00 Subject: Re: time difference calcualtion > uval wrote in post #8566: >> Hello, >> >> I would like to calculate the difference between two times in seconds >> eg >> >> Fri Dec  2 03:12:19 2005 >> Fri Dec  2 14:44:47 2005 Just keep it simple. You can do math with Time objects, and the unit of time for a Time object is the second. So, turn your dates into Time objects: require 'time' first = Time.parse('Fri Dec 2 03:12:19 2005') second = Time.parse('Fri Dec 2 14:44:47 2005') Then subtract one from the other: difference = second - first Kirk Haines Software Engineer EngineYard