> No need for Date::Manip or anything: > > > $timestamp = 36059; > $time = sprintf '%02d:%02d:%02d', > $timestamp / 3600, ($timestamp/60) % 60, $timestamp % 60;
Jeez, that is exactly how it should be! I overlooked the obvious in search of the exotic. Thanks, -tir On Wed, 5 Dec 2001, Jenda Krynicky wrote: > From: "Tirthankar C. Patnaik" <[EMAIL PROTECTED]> > > I have a set of timestamps, which are seconds since midnight. > > > > say, 36000 > > 36001 > > 36002 > > ..... > > > > I'd like to convert them into the format: > > > > 10:00:00 > > 10:00:01 > > ..... > > > > Can I do this using Date::Manip, failing, which, is there any other > > way in perl? > > No need for Date::Manip or anything: > > > $timestamp = 36059; > $time = sprintf '%02d:%02d:%02d', > $timestamp / 3600, ($timestamp/60) % 60, $timestamp % 60; > > Jenda > > =========== [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ========== > There is a reason for living. There must be. I've seen it somewhere. > It's just that in the mess on my table ... and in my brain. > I can't find it. > --- me > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Tirthankar, IGIDR. +91-22-8400919 x275 (r), x593(o), x(542), +91-22-8421206 (r) http://www.igidr.ac.in/~tir It may be we shall touch the Happy Isles, And see the great Achilles whom we knew. Ulysses. -Tennyson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]