خرید بک لینک

Vote count: 0

I am looking for some ideas on how to accomplish a date difference in hours while grouping by date in mySQL. For example, the normal DateDiff (Hours) method on the below dates will result in 49 hours, but I am interested in which days had which share of the total 49 hours:

Date 1: 2016-06-12 12:00
Date 2: 2016-06-14 13:00

Result:

Start End Diff
2016-06-12 12:00 2016-06-13 00:00 12 Hours
2016-06-13 00:00 2016-06-14 00:00 24 Hours
2016-06-14 00:00 2016-06-14 13:00 13 Hours

Thanks!

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 24 خرداد 1395 ساعت: 9:21

صفحه بندی