here is some more iformation about what im trying to solve sir lbltime.caption is where the current time is viewed then i have 3 more label's that is lblin.caption where you store the log in of a user then lblout.caption and this is the log out and the lbldur.caption where i want the computation of how much time is consumed im using visial basic to program a command button called start gets the log in and out button calls the log out and button duration for the computation here is the syntax of the program
private sub timer()
lbltime.caption = time()
______________________________
private sub command_cmdstart()
lblin.caption = lbltime.caption
______________________________
private sub command_cmdout()
lblout.caption = lbltime.caption
______________________________
private sub command_duration()
time1 = val(lblin.caption)
time2 = val(lblout.caption)
lbldur.caption = val(time2 - time1)
i tried to make time1 and time2 as an integer and as a long but the answer always returns zero please help me and thank you very much
Enter your message below
Sign in or Join us (it's free).