time computation in vb

sheng's Avatar, Join Date: Aug 2008
Newbie Member
have you tried to compute the time (hours,minutes,seconds) in visual basic 6.0???
kindly share your ideas...thanks....
xpi0t0s's Avatar, Join Date: Aug 2004
Compute the time from what? Are you converting something to H,M,S, or are you counting time? If the latter it's just a case of incrementing three variables and wrapping round to zero when each reaches an appropriate value.
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Please post the complete context.
sheng's Avatar, Join Date: Aug 2008
Newbie Member
My objective is to make a log in/log-out system that will compute the total number of hours of an employee…I used vb 6.0 as my front-end to ms sql 2000 as the back-end. The time will be saved on the database and the corresponding date (e.g. 2008-11-25 10:00:00 AM) since the time and date cannot be recorded in separate manner because of the data type datetime of the ms sql. My problem is how to compute and retrieve the time alone from the database and the date will be not included? Kindly share your ideas please. Thanks in advance.
Cseek's Avatar, Join Date: Dec 2009
Go4Expert Member
let the data base store the date/time info in any manner that's not the problem to calculate the lapsed period between the two times

is dataediff("n",fieldLogintime,fieldLogOuttime) is not working !
please post your SQL statement