Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
Hi Guys and Gals,
I have a start button. This should start a timer. The stop button(whe clicked) should calculate the time difference between the start an stop events. How would I do this? I am basically monitoring a user' activities to see exactly how long it takes them to carry out a certai task. Cheers people Josep -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
when u click start, capture the current time and when you click sto
again capture the current time. find the difference between the two Roughly speaking startTime = now() endTime = now() totalTimeDays = endTime - startTime (this will give you time in days) If you want in seconds, mutiply totalTimeDays with nos of seconds totalTimeSecs = totalTimeDays * (24*60*60) Manges -- Message posted from http://www.ExcelForum.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
Hi Mangesh,
This is more or less what I'm looking for, but I don't want the dat part, I know you can use Format to to get what you want, but Im a bi unsure as to the syntax? I need the difference to be displayed in HH:M format? Cheer -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
so its all the more simple. you jsut have to find the diff i.e
totalTimeDays and then format the cell to display the result in HH:MM Manges -- Message posted from http://www.ExcelForum.com |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
I see what you're saying, but this is going to be done in a form an
then saved to a database, so the formatting has to be done in code. Th other problem i'm having is the the startTime and endTime variables ar storing the same value from the Now() function. Here is the code: Dim startTime, endTime startTime = Now() endTime = Now() MsgBox (startTime) MsgBox (endTime) MsgBox (Format(startTime - endTime, "HH:MM:SS") -- Message posted from http://www.ExcelForum.com |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
Its ok Mangesh, I finally figured out that it was the position of the
variables in the code that was throwing it. Thanks for your help. --- Message posted from http://www.ExcelForum.com/ |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Difference between two events
yes ofcourse. You need to place the start so that the line is executed
right after you click the start button. And similar is the end button mangesh --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
# Events over time? | Excel Discussion (Misc queries) | |||
Need formula for time between two events | Excel Worksheet Functions | |||
subtract the time difference from another time difference | Excel Discussion (Misc queries) | |||
Having Events Run at specified time. | Excel Programming | |||
Run Time control events | Excel Programming |