I have a table with times. Inside this I have a column arrival_time
which is a decimal
Here are some example values :
arrival_time |
---|
6.23 |
6.58 |
5.51 |
So 6.23
is for 6 hours and 23 minutes.
I want to sum
the values as time
and not as decimal
So I tried this
datediff(hour,min(cast(arrival_time as time)),max(cast(arrival_time as time))),
And I got this error
Explicit conversion from data type decimal to time is not allowed.
I didn't find how to convert the type and then sums the values.
What I am doing wrong?