Hello,
i have the following statement:
SELECT AVG(ROUND(Datediff(ss,start,end)/3600),2))
i want to have the following output:
1,27 hours
2,19 hours
1,03 hours
0,28 hours
5,93 hours
As start and end variables are time datatypes i have to cast it to a decimal to get the desired output, don't i?
So i tried this:
SELECT AVG(ROUND(Cast(Datediff(ss,start,end)/3600 as decimal(15,2)),2))
But it doesn't deliver the desired output:
1,27154 hours
2,19081 hours
1,03333 hours
0,28000 hours
5,93413 hours
What am i doing wrong here?
Thx 4 any help
i have the following statement:
SELECT AVG(ROUND(Datediff(ss,start,end)/3600),2))
i want to have the following output:
1,27 hours
2,19 hours
1,03 hours
0,28 hours
5,93 hours
As start and end variables are time datatypes i have to cast it to a decimal to get the desired output, don't i?
So i tried this:
SELECT AVG(ROUND(Cast(Datediff(ss,start,end)/3600 as decimal(15,2)),2))
But it doesn't deliver the desired output:
1,27154 hours
2,19081 hours
1,03333 hours
0,28000 hours
5,93413 hours
What am i doing wrong here?
Thx 4 any help