php - Converting large number of seconds to `H:i:s` format -


in image below,

sec_to_time(sum(time_to_sec(talktime))) value on right and

sum(time_to_sec(talktime)) on left.

enter image description here

last value given sec_to_time(sum(time_to_sec(talktime))) 838:59:59

i tried echo gmdate("h:i:s", 4874010);.but has limit 86,400.

can please me in converting large number of seconds h:i:s format.

you have overflow on time type. think mysql documentation pretty clear on limits:

mysql retrieves , displays time values in 'hh:mm:ss' format (or 'hhh:mm:ss' format large hours values). time values may range '-838:59:59' '838:59:59'.

edit:

you can convert seconds time manually:

select concat_ws(':',                  floor(sum(time_to_sec(talktime)) / 3600),                  lpad(mod(floor(sum(time_to_sec(talktime) / 60)), 60), 2, '0'),                  lpad(mod(sum(time_to_sec(talktime)), 60), 2, '0')                 ) 

Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -