Click here to Skip to main content
15,906,569 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I want to calculate the number of hours worked using ASP.Net. I am doing a mini project on employee an profile management program.
Also please give me some suggestions like what can be added in employee profile management. Give some creative idea different from formal or usual things. Please help me. :(
Posted
Updated 28-Feb-13 5:46am
v3
Comments
Richard C Bishop 28-Feb-13 11:42am    
Please do not use abreviations when asking a question. It only serves to confuse those reading it and it could stop some from helping you. Just a friendly comment for future reference.

1 solution

you have to do something like this exampal
DateTime inTime = DateTime.Now;//Get ur in time from ur logic
DateTime outTime = DateTime.Now.AddHours(7);//or Get ur out time from ur logic
TimeSpan span = outTime.Subtract(inTime);
TextBox1.Text = span.Hours.ToString();
 
Share this answer
 
Comments
Thenmozhi D 1-Mar-13 7:32am    
Thank you :)

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