Skip to main content

Time In & Time Out (For Payroll System)

I have this Time In and Time Out Text1.text = Time in Text2.text = Time out Text3.text = Total number of hours work My problem is how can I calculate the total time of work of an employee? Example: I put a 8:38 am in Time In then 5:00 pm in Time Out. I want to gather a code which can actually calculate the total number of hours work of an employee. Because if I add this two numbers it will appear 13:38 instead of 7:22 total number of hours. If any one know or have an idea please kindly post it. Thank you in advance ^_^
Submitted bycruzon Wed, 01/27/2010 - 22:28

you can try to use this one where dtpicker1 is you subtrahend and dtpicker2 is your minuend Private Sub Command1_Click() Me.Text1.Text = TimeDiff(Me.DTPicker1.Value, Me.DTPicker2.Value) End Sub Private Function TimeDiff(Time1 As String, Time2 As String) As String Dim MinsDiff As String Dim TheHours As String MinsDiff = DateDiff("n", Time1, Time2) 'If midnight is between times MinsDiff = IIf(MinsDiff

Thank you for your reply and I appreciate it. Sir all I want is a Text1 and Text2 to be converted in the number of hours work. As simple as that. Is there any way I can calculate it?
Submitted byJezel is the R… (not verified)on Wed, 08/01/2012 - 17:31

In reply to by cidfrey

Try this simplest way in this case In 8:33AM then Out is 5:00PM 1. Use the Military time In 8:33 - Out 17:00 2. Out +.60 minutes - In - 1hour= ? ex. 17.00 +.60=17.60-8.33=9.27 - 1hr= 8:27 (Out) (In) (Total) then, its up to u if u will subtract the breaktime dun sa total
Submitted byAnonymous (not verified)on Fri, 01/29/2010 - 19:41

please do try to analyze more what you want to do... you can't get a no. of hours of work with out deducting the time out with the time in...
Submitted byAnonymous (not verified)on Thu, 02/11/2010 - 20:57

we also have the same problem i think.. i do also want to have the codes where a professor can see his or her personal account wherein there are his schedule of his class. and eventually make it TIME IN. After wards make it also TIME OUT. Where he can see in another label or text box how many hour/s did he spent teaching in whole day. please response if whoever knows the simple code using FORM only. NOT modules or anything. thanks --aissa--
Submitted byAnonymous (not verified)on Fri, 02/12/2010 - 13:30

In reply to by Anonymous (not verified)

you can use the datediff or dateadd funtion of vb6 to calculate time. ^_^ aja.... hehehe
Submitted byAnonymous (not verified)on Sun, 03/21/2010 - 22:48

Hi Try This Link Sir! and download the source code, this code is exactly what you want !! Evan Millana
Submitted byAnonymous (not verified)on Mon, 03/22/2010 - 13:20

u have to include the date also to get the actual number of hrs. used the datediff ().
Submitted byAnonymous (not verified)on Wed, 04/07/2010 - 01:26

Wow this is an Old forum !!! .I think u already got the solution ... I hope this will help to readers and googlers Create 2 Textboxes and one button Private Sub Command1_Click() MsgBox DateTime.DateDiff("n", Text1.Text, Text2.Text) End Sub 'then divide it by 60 use this "\" not "/" ,to calculate hours and mod 60 to caculate minutes 'Ur var as string = Ur var as integer \ 60 & " Huors And " & varblah Mod 60 & " Minutes" Download this file for complete demonstration >>>>>>>------------------------------------------------------------------------------>> from Evan Millana >>>>>------On error goto hell ok ok! ------------------>>
Submitted byAnonymous (not verified)on Wed, 10/20/2010 - 11:14

=E11-B11+IF(B11>E11,1)-AA11 b11= time in e11 = time out aA11 = 1HOUR BREAK IF HAVE ONLY can have your code im trying to debug this same problem., but theres to much trash code on it
Submitted byAnonymous (not verified)on Mon, 02/14/2011 - 09:27

In reply to by Anonymous (not verified)

how to cr8 a time in time out system ? what is the code?
Submitted byAnonymous (not verified)on Mon, 10/03/2011 - 18:07

In reply to by Anonymous (not verified)

import*; import java.text.*; import java.util.StringTokenizer; public class Payroll { public static void main(String args[])throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(; String empCode; System.out.print("Enter Employee Code: "); //Get employee Code empCode = br.readLine(); displayInformation(empCode); //Call the methode display Information setLogged(empCode); } public static void displayInformation(String ecode)throws IOException { DecimalFormat df=new DecimalFormat("0.00"); FileInputStream fs = new FileInputStream("employee.txt"); BufferedInputStream bf = new BufferedInputStream(fs); DataInputStream dis = new DataInputStream(bf); String line; //Get the data per line String tempEmployee=""; int noofrecords=5; String[] code = new String[noofrecords]; //Array of records String[] employee = new String[noofrecords]; String[] level = new String[noofrecords]; int x=0,find=0; double salary; StringTokenizer st1; //Get the data in the text file while(x
Submitted byAnonymous (not verified)on Mon, 05/16/2011 - 10:08

Please Help Me Po.. I need a system where in he dont need to input he's time of in .. he just need a command button and the time will just apper on textbox same with the time out .. supposedly he click again the time in, a msgbox will appear that "YOU ALREADY LOGGED IN" .. same with the time out .. i need it please for my project .. i need also the hours late , day absent and ot .. help me .. :'( thank you po .. :)
Submitted byAnonymous (not verified)on Tue, 11/29/2011 - 13:10

can you post codes using C# for payroll system... please.....thanks
Submitted byAnonymous (not verified)on Thu, 12/08/2011 - 09:03

...may i get the command for the calculation of time in and timeout in fox pro because i don't know how to get the exact command for this program..please reply!! thank you in advance... for syntax command....
Submitted bymitch18 (not verified)on Tue, 01/10/2012 - 17:57

can you help me poe to have a C++ code in regarding with the time in and time out payroll system??? just contact me here: 09993970779 [email protected] tnx.....
Submitted byHI im ivy (not verified)on Sun, 03/04/2012 - 21:54

can somebody help me with a simple payroll using java ..
Submitted byferdie (not verified)on Sat, 06/30/2012 - 11:04

mga sir me ask po ako. . meron po kasi ako dalawang textbox textbox1 = timein textbox2 = timeout pag click ko po sa command button macocompute yung night shift differential kung ilang oras example po 6am to 6pm pero 10pm pa mgsstart yung night shift so magiging output po yung 10 to 6 lang pano po ang condition dito at yung code?
Submitted byAnonymous (not verified)on Thu, 02/28/2013 - 22:37

sir pls help me i need the full code of this program i hope you can give me the codes and the format of it thankyou sir

Submitted byNatassja Cryst… (not verified)on Wed, 01/07/2015 - 14:04

please help me, we need to finish this project before January 28, i only focus on time keeping/ time in /timeout/ history log. email me if you can help if not , still wanna say thanks.
Submitted bykhbaltazar (not verified)on Sat, 07/02/2016 - 03:25

Text3.Text = Format(DateDiff("n", Text1.Text, Text2.Text) / 60, "0#.00")
Submitted byShadow_Hiders (not verified)on Thu, 09/29/2016 - 12:51

hello po! patulong lng po sana kung panu e calculate ang total number of hours in 1 week **** MORNING timein= 8:00 timeout=12:00 AFTERNOON timein=1:00 timeout=5:00
Submitted byshaime (not verified)on Thu, 09/29/2016 - 13:18

hello po magpapatulong lang po ako sana kung pano eh calculate ang total no. of worked in one week at kung pano po makuha ang hourly rate.....kung pwede po...?

Submitted byshaime (not verified)on Thu, 09/29/2016 - 13:19

hello po magpapatulong lang po ako sana kung pano eh calculate ang total no. of worked in one week at kung pano po makuha ang hourly rate.....kung pwede po...?

Add new comment