Finding a time span

wallaceka

New Member
Joined
Apr 3, 2002
Messages
15
I have a user that would like to track the time that elapses between the time he attempts to initiate contact with someone and the time they get back to him. Ideally, if this could be tracked down to the minute, that would be grand. The span could potentially be days or hours (worst case weeks). I know this is POSSIBLE; I am just not sure how to implement it. I have posted several times to this board, always with amazing results. Thanks for any help given, Kathi.
 
The Board is acting strange!

A small addition to my post.
A more extensive custom format

28/03/2002 10:05 04/04/2002 11:07 7 day(s) 1 Hour(s) 02 Minute(s)

d "day(s)" h "Hour(s)" mm "Minute(s)"
This message was edited by Dave Patton on 2002-04-04 09:06
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
and the best thing about it is that it works..you guys are the BEST!!!
*hugs.all.around*
yeah, yeah...that IS a girl thing
*laugh*
thanks again everyone!
 
Upvote 0
Public Function TimeSpanInSeconds(ByVal StartDateTime As Date, EndDateTime As Date) As Double
Const ThisProcName = "TimeSpanInSeconds"
On Error GoTo ExitLabel
Dim DifferenceInDays As Double
DifferenceInDays = (EndDateTime - StartDateTime)

TimeSpanInSeconds = DifferenceInDays * 24 * 60 * 60
ExitLabel:
On Error GoTo 0
Exit Function
ErrorLabel:
MsgBox "Error " & Err.Description & " occured on " & ThisProcName
Resume ExitLabel
End Function



Public Function TimeSpanInDays(ByVal StartDateTime As Date, EndDateTime As Date) As Double
Const ThisProcName = "TimeSpanInSeconds"
On Error GoTo ExitLabel
TimeSpanInDays = (EndDateTime - StartDateTime)
ExitLabel:
On Error GoTo 0
Exit Function
ErrorLabel:
MsgBox "Error " & Err.Description & " occured on " & ThisProcName
Resume ExitLabel
End Function
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,047
Messages
6,122,858
Members
449,096
Latest member
Erald

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top