
One day i had a little problem with my office work. Report that we made not in accordance with user, one of them, report has time value with standard format : hh : mm : ss but user want a value in number like 1,5 hour for 1:30:00. Solution of this situation, we can use time_to_sec() function in mysql. TIME_TO_SEC( ) converts a TIME value to the equivalent number of seconds, and SEC_TO_TIME( ) does the opposite. The following query demonstrates a simple conversion in...