How to count an Overtime
-
Hi.... guys I need a favor from you who have an experience in Overtime calculation, I want to build a program which could counting overtime for each employee in my company, I need to know how to count the overtime which is over than two days as well , I mean if the overtime is start from 17:00 until 04:00 following days. Thank you fro your attetnion and your support in advance. Best regards :-D ICE
-
Hi.... guys I need a favor from you who have an experience in Overtime calculation, I want to build a program which could counting overtime for each employee in my company, I need to know how to count the overtime which is over than two days as well , I mean if the overtime is start from 17:00 until 04:00 following days. Thank you fro your attetnion and your support in advance. Best regards :-D ICE
Include the date in the data, then you can calculate the time difference without problem. The difference between 2006-06-01 17:00 and 2006-06-02 04:00 is 11 hours or 660 minutes: Dim start As DateTime = New DateTime(2006,6,1,17,0) Dim finish As DateTime = New DateTime(2006,6,2,4,0) Dim minutes As Integer = finish.Subtract(start).TotalMinutes --- b { font-weight: normal; }
-
Include the date in the data, then you can calculate the time difference without problem. The difference between 2006-06-01 17:00 and 2006-06-02 04:00 is 11 hours or 660 minutes: Dim start As DateTime = New DateTime(2006,6,1,17,0) Dim finish As DateTime = New DateTime(2006,6,2,4,0) Dim minutes As Integer = finish.Subtract(start).TotalMinutes --- b { font-weight: normal; }
Hi Guffa Thank a lot for your advise and I have tried to write and run those command into a small program but it doesn't working well. I made Three Text box ( textbox1,textbox2 and textbox3), and here is the structure of my program dim start as datetime dim finish as datetime dim minutes as integer start=textbox1.text finish =textbox2.text minutes=finish.subtract(start).totalminutes textbox3.text=minutes I tried to run this program but it wont be runing propherly it just has 0 as the result came up on the textbox3 I am affraid that I have made a mistake, but I have no idea how to write the right logic program for this case. If you don't mind please let me get your next advise Thank you Best regards :) ICE
-
Hi Guffa Thank a lot for your advise and I have tried to write and run those command into a small program but it doesn't working well. I made Three Text box ( textbox1,textbox2 and textbox3), and here is the structure of my program dim start as datetime dim finish as datetime dim minutes as integer start=textbox1.text finish =textbox2.text minutes=finish.subtract(start).totalminutes textbox3.text=minutes I tried to run this program but it wont be runing propherly it just has 0 as the result came up on the textbox3 I am affraid that I have made a mistake, but I have no idea how to write the right logic program for this case. If you don't mind please let me get your next advise Thank you Best regards :) ICE