count date difference in hours using php and mysql

后端 未结 2 1228
余生分开走
余生分开走 2021-01-24 07:17

How can i find the date difference in hours using php and mysql both.

相关标签:
2条回答
  • 2021-01-24 07:50

    For MySQL there are a number of DATE/TIME functions, DATEDIFF(), SUBDATE(), SUBTIME()

    0 讨论(0)
  • 2021-01-24 07:52

    Use TIMEDIFF() then take the part before the first colon to get the hours.

    0 讨论(0)
提交回复
热议问题