Time calculation
-
Hi, In my table having, from time and to time, I have to calculate the difference between the two times to calculate hour's of time worked. So can anyone provide me a solution
-
-
Yes, I checked using datediff and my query is
select datediff(hh,'05:30:00','10:00:00') from tablename
but it gives me 5 as answer which is not correct
It is perfectly correct, you looked for the difference in hours. Use your brain, try minutes or even seconds, if you wait for answers to be spoon fed to you it is going to be a long slow day.
Never underestimate the power of human stupidity RAH
-
It is perfectly correct, you looked for the difference in hours. Use your brain, try minutes or even seconds, if you wait for answers to be spoon fed to you it is going to be a long slow day.
Never underestimate the power of human stupidity RAH