Answer the question
In order to leave comments, you need to log in
Is it possible to add time intervals in MySQL TIME format using standard PHP tools?
My table has a column in the HH:MM:SS format, which indicates the recommended time to complete a particular task. You need to add these values and get the result in the same format. Is it possible to do this with standard PHP tools for working with time, or will you have to translate everything into seconds, and then back?
Answer the question
In order to leave comments, you need to log in
Found the solution myself. Such operations were within the competence of MySQL)
SELECT sec_to_time(sum(time_to_sec(ex_time))) as total_time FROM table_name;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question