Hi I have date data for example
Start
2017-10-25 04:00:00
End
2017-10-25 05:00:00
I want to substract time between End and Start so the result will be
1 day 1 hour
please tell me the formula..
thx
Hi I have date data for example
Start
2017-10-25 04:00:00
End
2017-10-25 05:00:00
I want to substract time between End and Start so the result will be
1 day 1 hour
please tell me the formula..
thx
SELECT DATEDIFF(hh,'2017-10-25 04:00:00','2017-10-25 05:00:00')/24 AS 'Days'
,DATEDIFF(hh,'2017-10-25 04:00:00','2017-10-25 05:00:00') -
(DATEDIFF(hh,'2017-10-25 04:00:00','2017-10-25 05:00:00')/24)*24 AS 'Hours'
thx...