AnyOne knows How It can Be Done?
Author |
Message |
TheSuppli #1 / 8
|
 AnyOne knows How It can Be Done?
I am making A program which tracks you InterNet activities, and then, lets say in the end of the month, gives you a detailed report on your activities, and the costs... =) I know this program exists, but i am doing it in order to Practice
well, I KNow how to do everything, and now I am in the possition of having 2 Varaibles (BeginOnline, EndOnline) - Which are defined As Date. [I do something Like that, when the program recognizes that I got Connected: BeginOnline = Format$(Now, "hh:mm:ss") ] [when I get disconnected: EndOnline = Format$(Now, "hh:mm:ss") ] Now, I Wanna put this information into a file, so i could save this information, for Future use (The "Detailed Report"). So, what i need to know is: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= 1. how to write that information every time into a file. 2. How can I retrieve this information, AfterWards. TO everyOne which try to help..... THANK YOU VERY MUCH !!!
|
Sun, 24 Jun 2001 03:00:00 GMT |
|
 |
Andre' Somer #2 / 8
|
 AnyOne knows How It can Be Done?
Quote:
>I am making A program which tracks you InterNet activities, and then, >lets say in the end of the month, gives you a detailed report on your >activities, and the costs... =) >I know this program exists, but i am doing it in order to Practice
>well, I KNow how to do everything, and now I am in the possition of >having 2 Varaibles (BeginOnline, EndOnline) - Which are defined As >Date. >[I do something Like that, when the program recognizes that I got >Connected: BeginOnline = Format$(Now, "hh:mm:ss") ]
Trying to assign a String (Format() returnes a string) to a Date while you allready have a date?! Just the Now() would do! Quote: >[when I get disconnected: EndOnline = Format$(Now, "hh:mm:ss") ] >Now, I Wanna put this information into a file, so i could save this >information, for Future use (The "Detailed Report"). >So, what i need to know is: >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >1. how to write that information every time into a file. >2. How can I retrieve this information, AfterWards.
I would use a database. Something like JET would suit just fine. There is A LOT of info on this subject in your helpfile and over this and other groups. Andr Quote: >TO everyOne which try to help..... >THANK YOU VERY MUCH !!!
Welcome...
|
Sun, 24 Jun 2001 03:00:00 GMT |
|
 |
Otse #3 / 8
|
 AnyOne knows How It can Be Done?
Quote: > Trying to assign a String (Format() returnes a string) to a Date while you > allready have a date?! Just the Now() would do!
Not really because the format of Now() changes depending on your locale. Using Format instead would force it to appear the same no matter who uses the program. Otser.
|
Mon, 25 Jun 2001 03:00:00 GMT |
|
 |
Andre' Somer #4 / 8
|
 AnyOne knows How It can Be Done?
Quote:
>> Trying to assign a String (Format() returnes a string) to a Date while >you >> allready have a date?! Just the Now() would do! >Not really because the format of Now() changes depending on your >locale. Using Format instead would force it to appear the same >no matter who uses the program. >Otser.
If you just try to store it, that doesn't matter at all! By the way, by setting the string value of Format back to the Date value (as he did), you might introduce an error such as the switching of the day and the month! If you use a storage like the JET database, you can use the Date type field, and store the date, not it's human readable representation. Andr
|
Mon, 25 Jun 2001 03:00:00 GMT |
|
 |
Otse #5 / 8
|
 AnyOne knows How It can Be Done?
Quote: > If you just try to store it, that doesn't matter at all!
You're right -- I didn't consider that when I responded. Otser.
|
Mon, 25 Jun 2001 03:00:00 GMT |
|
 |
Yoram Shechor #6 / 8
|
 AnyOne knows How It can Be Done?
I'd like to add that by using the Date without any format will help for calculation of the connection period. if you store only the time what will happen if you get connected at 23:00 and disconnect at 01:00 ?? Quote:
> > If you just try to store it, that doesn't matter at all! > You're right -- I didn't consider that when I responded. > Otser.
|
Thu, 28 Jun 2001 03:00:00 GMT |
|
 |
Gil #7 / 8
|
 AnyOne knows How It can Be Done?
Quote:
>I am making A program which tracks you InterNet activities, and then, >lets say in the end of the month, gives you a detailed report on your >activities, and the costs... =) >I know this program exists, but i am doing it in order to Practice
>well, I KNow how to do everything, and now I am in the possition of >having 2 Varaibles (BeginOnline, EndOnline) - Which are defined As >Date. >[I do something Like that, when the program recognizes that I got >Connected: BeginOnline = Format$(Now, "hh:mm:ss") ] >[when I get disconnected: EndOnline = Format$(Now, "hh:mm:ss") ] >Now, I Wanna put this information into a file, so i could save this >information, for Future use (The "Detailed Report"). >So, what i need to know is: >-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >1. how to write that information every time into a file. >2. How can I retrieve this information, AfterWards. >TO everyOne which try to help..... >THANK YOU VERY MUCH !!!
u need a basic knwoldege of using Databases with VB it's real easy if u got acess...
|
Tue, 24 Jul 2001 03:00:00 GMT |
|
 |
Matt Beal #8 / 8
|
 AnyOne knows How It can Be Done?
Another Easy method, instead of saving, would be to use your modem log. This contains percise connection times and disconnect times to the nearest millisecond. I have a code example if you want it. Although it is rather complecated. Quote:
>>I am making A program which tracks you InterNet activities, and then, >>lets say in the end of the month, gives you a detailed report on your >>activities, and the costs... =) >>I know this program exists, but i am doing it in order to Practice
>>well, I KNow how to do everything, and now I am in the possition of >>having 2 Varaibles (BeginOnline, EndOnline) - Which are defined As >>Date. >>[I do something Like that, when the program recognizes that I got >>Connected: BeginOnline = Format$(Now, "hh:mm:ss") ] >>[when I get disconnected: EndOnline = Format$(Now, "hh:mm:ss") ] >>Now, I Wanna put this information into a file, so i could save this >>information, for Future use (The "Detailed Report"). >>So, what i need to know is: >>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= >>1. how to write that information every time into a file. >>2. How can I retrieve this information, AfterWards. >>TO everyOne which try to help..... >>THANK YOU VERY MUCH !!! >u need a basic knwoldege of using Databases with VB >it's real easy if u got acess...
|
Sat, 28 Jul 2001 03:00:00 GMT |
|
|
|