S
S
snake22021-11-22 13:21:58
SQL
snake2, 2021-11-22 13:21:58

How to get the time in minutes between two dates?

There is a date in the format
yyyy-mm-dd h:i:s
How to get the difference between them in minutes

Test::select(
            'failure_start',
            'failure_end',)
            ->selectRaw('round(abs(failure_start - failure_end) / 60) as time')

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question