Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Between 2 intervals
I have a set of values that are being measure every 5
seconds, when the values are falling and hit a low point I want to set a marker that is the time and date. some time later maybe 1,2 or 3 days, it will drop again, and I want to log another marker and work out the time in hours between the two. I set of with a number of if then else statements to decide how many days differance there were, then tried to work out the hours but It all fell apart. Is there any easy way of seting off a timer and then stopping it ? I looked at the timer function but this only gives the number of seconds since the last midnight ? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Between 2 intervals
If you have two time points, say that are on different days and you want to
calculate the amount of time between them, you can do something like this: Assign each time point to a variable, as it occurs, like: timeA = Now When you have your two timepoints, timeA and timeB, you can then get the amount of time between them: timeDif = timeB - timeA which will be a decimal value for the number of days between the two time points. You can then convert this to whatever time unit you like, for example: timeDifHours = timeDif * 24 timeDifSeconds = timeDif * 86400 HTH, Shockley "Neil" wrote in message ... I have a set of values that are being measure every 5 seconds, when the values are falling and hit a low point I want to set a marker that is the time and date. some time later maybe 1,2 or 3 days, it will drop again, and I want to log another marker and work out the time in hours between the two. I set of with a number of if then else statements to decide how many days differance there were, then tried to work out the hours but It all fell apart. Is there any easy way of seting off a timer and then stopping it ? I looked at the timer function but this only gives the number of seconds since the last midnight ? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Time Between 2 intervals
look at Chip Pearson's site for the application.OnTime method
http://www.cpearson.com/excel/ontime.htm Dates/times are stored as the elapesed number of days from a base date. To get the elapsed number of hours (End-Start)*24 -- Regards, Tom Ogilvy "Neil" wrote in message ... I have a set of values that are being measure every 5 seconds, when the values are falling and hit a low point I want to set a marker that is the time and date. some time later maybe 1,2 or 3 days, it will drop again, and I want to log another marker and work out the time in hours between the two. I set of with a number of if then else statements to decide how many days differance there were, then tried to work out the hours but It all fell apart. Is there any easy way of seting off a timer and then stopping it ? I looked at the timer function but this only gives the number of seconds since the last midnight ? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculating date/time intervals?? | Excel Worksheet Functions | |||
Time Clock Intervals | Excel Discussion (Misc queries) | |||
SUM-ing date for different time intervals | Excel Worksheet Functions | |||
comparing time intervals | Excel Worksheet Functions | |||
Time Intervals | Excel Worksheet Functions |