To convert the interval from seconds to other units, perform the appropriate division
mysql>
mysql> SELECT @interval AS seconds,
-> @interval / 60 AS minutes,
-> @interval / (60 * 60) AS hours,
-> @interval / (24 * 60 * 60) AS days,
-> @interval / (7 * 24 * 60 * 60) AS weeks;
+---------+------------+----------+--------+--------+
| seconds | minutes | hours | days | weeks |
+---------+------------+----------+--------+--------+
| 604800 | 10080.0000 | 168.0000 | 7.0000 | 1.0000 |
+---------+------------+----------+--------+--------+
1 row in set (0.00 sec)
mysql>
Related examples in the same category