> I have a value 178607, which is stored as seconds. I
> like to convert it (178607 Secs) to Hours, Minutes and
> Seconds appropiatly.
> Can anybody help me supplying the code?

If it's stored in MySQL, you can use SEC_TO_TIME()

mysql> select sec_to_time(178607);
+---------------------+
| sec_to_time(178607) |
+---------------------+
| 49:36:47            |
+---------------------+
1 row in set (0.00 sec)

mysql> select sec_to_time(178607)+0;
+-----------------------+
| sec_to_time(178607)+0 |
+-----------------------+
|                493647 |
+-----------------------+
1 row in set (0.00 sec)

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to