.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> VB.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Find the working hours

Posted By: srini     Posted Date: November 11, 2010    Points:2   Category :VB.Net
Hi. I am doing application on vb.net and sql server 2005 as database. Here i am using TimeIn and TimeOut textboxes to know the timing of an employee.Then i have another textbox to calculate hours worked. so i want to find the difference between TimeIn and TimeOut.

Eg:
TimeIn: 09.45
TimeOut:5.45

HoursWorked:8.00



Responses
Author: Sajid P K             
Posted Date: November 11, 2010     Points: 5   

Srini,

May be follwing may help you.


 if ( timeOut < timeIN)
{
hourWorked = timeOut+ 12 - timeIN;
}
else
{
hourWorked = timeOut - timeIN;
}


Regards,



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend