seconds_diff

description

Syntax

INT seconds_diff(DATETIME enddate, DATETIME startdate)

The difference between the start time and the end time is seconds

example

1. mysql> select seconds_diff('2020-12-25 22:00:00','2020-12-25 21:00:00');
2. +------------------------------------------------------------+
3. | seconds_diff('2020-12-25 22:00:00', '2020-12-25 21:00:00') |
4. +------------------------------------------------------------+
5. |                                                       3600 |
6. +------------------------------------------------------------+

keywords

1. seconds_diff