Click here to Skip to main content
15,886,873 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
I have a table namely Employee.

Columns Of the Employee Table along with the given datatypes are as follows.

EmpID Current_Date InTime OutTime TotalWorkingHours
int Date varchar(50) varchar(50) varchar(50)

now i need to calculate TotalWorkingHours from the InTime and OutTime.

How To do this?????
Posted
Updated 7-Mar-13 17:22pm
v2

1 solution

try this,
C#
var hours = (datevalue1 - datevalue2).TotalHours;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900