0

I want to count how many hours, minutes and seconds between two dates.

For example: Date 1: 01-01-1990 12:00 and 01-02-1990 13:00

Now, how many hours, minutes, and second from date 1 to date 2 using php?

ldg
  • 9,112
  • 2
  • 29
  • 44
Japar S
  • 49
  • 4

1 Answers1

0

just use strtotime() on your dates to their timestampz . and then subtract them to have the difference in the number of seconds. it's easy to convert from there

Miad Abrin
  • 952
  • 7
  • 14