Use DATEDIFF(minute, shiftStart.timeEntered, shiftEnd.timeEntered) * 1.0 / 60
instead, to give you the hour as a decimal.
LittleBobbyTables
2010-10-09 02:14:13
Use DATEDIFF(minute, shiftStart.timeEntered, shiftEnd.timeEntered) * 1.0 / 60
instead, to give you the hour as a decimal.
Time card stuff is very business rule intensive. I would consider your architecture before putting all the rules in sp's.
This will return the Hours & Minutes: CAST(DATEDIFF(MINUTE, StartTime, EndTime) AS DECIMAL)/60