hi ., i need (logintime in one table and fixed working hours is eg:9 but a employee login at 10 o clock the delay hours is 1 hour . fixed working hours is saved in one table as companytime(tablename) and employee login time is saved in another table as logintime (table) i need to compare both the table and need the delay time )
Eg: Logintime is 10
fixed time is 9
----------
delay is 1 hour
-----------------
using asp.net using c#
Loading

SenthilkumarPosted Apr 12, 2012, 3:20 AM
Usually you can get the time difference by using this.
SELECT DATEDIFF(hh,GETDATE()-1,GETDATE()) AS [Difference]
I do not know about your table structure. But i assumed like this. You can change the condition according to your requirement.