Basit Khan

Basit Khan

  • NA
  • 336
  • 121.6k

Time convert into hour

Nov 19 2015 6:19 AM
Dear,
I have two Column Start & End both are Datetime data type.
The Data is
Start    End
12:30   15:00
The Total min is 150
i used below query
DATEDIFF(mi, dbo.Trn_Daily3.Dr_TimeStart, dbo.Trn_Daily3.Dr_TimeEnd)
Its giving correct result=150
But when i convert into hour
DATEDIFF(mi, dbo.Trn_Daily3.Dr_TimeStart, dbo.Trn_Daily3.Dr_TimeEnd)/60
then result is 2 but actual 150/60=2.5
How to do it.
Please help on this
Thanks
Basit.
 

Answers (2)