From: Todd Benson Date: 2012-10-11T01:00:50+09:00 Subject: Re: Seconds to hr:min:sec def ptime sec ground, sec = Time.new(2012, 1, 1, 0, 0), sec.abs return sec.abs > 86400 ? nil : (ground + sec).strftime("%T") end On Wed, Oct 10, 2012 at 9:51 AM, ajay paswan wrote: > How can I convert seconds to the format in subject. > > Is there any function in Time or just need to program it? > > -- > Posted via http://www.ruby-forum.com/. >