Calculate Average of time HH:MM MySql Php |
Hello,
I have a table with time field that stores 24hr. time duration in HH:MM format, need help to calculate Average of time values across the table. Example: 03:15 05:13 10:20 Any help would be appreciated.
(08-27-2018, 03:22 PM)ebaad Wrote:(08-27-2018, 03:06 PM)php_rocs Wrote: @ebaad, Hello, I hope this helps you: SELECT SEC_TO_TIME(AVG(TIME_TO_SEC(`hours`))) FROM `table_name` |
Welcome Guest, Not a member yet? Register Sign In |