|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
solving calculations involving Time
Help please..
here are the specs of our program.. we are to create a program that would act as an internet usage tracking system. it's simple, the program would be installed in one PC and would serve as a logbook. Each student is given 200 minutes of internet time per week. my idea was... that if i could get the time that they logged-in and the time they logged-out, i could get the difference(log-out minus log-in) to get the number of minutes that they have consumed so that i could subtract that from their total available internet time. the problem is, i don't know how to subtract time. i tried the val(text1.text) - val(text2.text) method but the answer comes out as zero. any suggestions guys? we've only got at least 3wks to do this together with a User's Manual and external documentation. thanks a lot guys! |
|
#2
|
|||
|
|||
|
Just
text1.text *1.0 - text2.text*1.0 or cdate(text1.text)- cdate(text2.text) But if you want 200 min exactly, if they never got out you will never stop the service, you have to have a process that continuosly is checking if he is on board or not and adding the time in a database where all students status and time is set. |
|
#3
|
|||
|
|||
|
datediff()
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#4
|
|||
|
|||
|
how do you use the datediff function?
|
|
#5
|
|||
|
|||
|
The entire VB6 reference is online courtesy of MS.
![]() http://msdn.microsoft.com/library/e...fctDateDiff.asp |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > solving calculations involving Time |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|