i have IN Time and Out Time ,in which i am calculating Hours from IN and Out Time,Now i want that when hours =8 then Day will be 1 and if Hours is more then to 8hours(for example :12hours minus from 8hours =4hours then 4hours multiply to 100rate)
i want store procedure ...
What I have tried:
SELECT INTime, Outtime, DATEDIFF(Hour, INTime, Outtime) AS Hours
if
Hours = 8
FROM EmployeeAttedance