Thanks Thanks:  0
Likes Likes:  0
Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Finding a time span

  1. #11
    Board Regular
    Join Date
    Feb 2002
    Location
    Calgary, Alberta Canada
    Posts
    3,428
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default


    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 ]

  2. #12
    MrExcel MVP
    Join Date
    Mar 2002
    Location
    Michigan USA
    Posts
    11,454
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Dave:
    That's Beautiful ... Short and Sweet!

  3. #13
    New Member
    Join Date
    Apr 2002
    Posts
    14
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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!

  4. #14
    New Member
    Join Date
    Feb 2009
    Posts
    5
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Finding a time span

    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 by JulioNobre; Jul 29th, 2011 at 06:51 AM.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •