Tag mysql time difference

MySQL TIME Function

Example Extract the time part from a time expression: SELECT TIME(“19:30:10″); Definition and Usage The TIME() function extracts the time part from a given time Note: This function returns “00:00:00” if expression is not a datetime/time, or NULL if expression…

MySQL PERIOD_DIFF Function

Example Return the difference between two periods: SELECT PERIOD_DIFF(201710, 201703); Definition and Usage The PERIOD_DIFF() function returns the difference between two periods. The result will be in months. Note: period1 and period2 should be in the same format. Syntax PERIOD_DIFF(period1,…