Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   time computation in vb (http://www.go4expert.com/forums/time-computation-vb-t15171/)

sheng 18Nov2008 12:59

time computation in vb
have you tried to compute the time (hours,minutes,seconds) in visual basic 6.0???
kindly share your ideas...thanks....

xpi0t0s 18Nov2008 16:46

Re: time computation in vb
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 18Nov2008 17:30

Re: time computation in vb
Please post the complete context.

sheng 19Nov2008 14:33

Re: time computation in vb
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.:pleased:

Cseek 13Dec2009 19:51

Re: time computation in vb
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

All times are GMT +5.5. The time now is 03:54.