Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old February 7th, 2005, 08:16 AM
bonyang26 bonyang26 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: I live in San Pedro, Laguna, Philippines
Posts: 2 bonyang26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 26 m 38 sec
Reputation Power: 0
Send a message via Yahoo to bonyang26
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!

Reply With Quote
  #2  
Old February 7th, 2005, 09:42 AM
Darius Darius is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 108 Darius User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 h 16 m 54 sec
Reputation Power: 5
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.

Reply With Quote
  #3  
Old February 7th, 2005, 03:56 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
datediff()
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #4  
Old February 8th, 2005, 01:01 AM
bonyang26 bonyang26 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Location: I live in San Pedro, Laguna, Philippines
Posts: 2 bonyang26 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 26 m 38 sec
Reputation Power: 0
Send a message via Yahoo to bonyang26
how do you use the datediff function?

Reply With Quote
  #5  
Old February 8th, 2005, 03:18 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
The entire VB6 reference is online courtesy of MS.

http://msdn.microsoft.com/library/e...fctDateDiff.asp

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > solving calculations involving Time


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT