+ Reply to Thread
Results 1 to 52 of 52

Difference between two Excel Date/Time Stamps

  1. #1
    Registered User
    Join Date
    06-28-2005
    Posts
    4

    Cool Difference between two Excel Date/Time Stamps

    How do I obtain the days, hours, min and sec between two date/time stamps represented in an excel spreadsheet?

    For example:

    I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps in cell A3?

    A
    _________________

    1 4/6/2005 10:00:00 AM
    2 4/4/2005 7:00:00 AM
    3 ??Days, ??Hrs, ??Min, ??Sec

  2. #2
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  3. #3
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  4. #4
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  5. #5
    Registered User
    Join Date
    06-28-2005
    Posts
    4

    More help needed.....

    Thanks to JE McGimpsey for the below solution, which works great to determine the duration between the two dates. I was really impressed with the time it took for you to respond. Thanks a million. However I have some more questions if you don't mind.

    Solution:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")


    Here's a new challenge!

    My next question is how can I have the calculation cull out weekends and holidays from the duration that the formula provides? If I have a duration that spans across a weekend and then a holiday between two dates, I don't want the duration result to reflect that time.


    Additionally, would it be possible to further constrain the result by culling out off-hours time between (1700-0600) daily? I only want to count time that has expired between (0600 - 1700) which is our standard work day.

  6. #6
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  7. #7
    Registered User
    Join Date
    06-29-2005
    Posts
    1

    Red face Excel calculation of accrued interest days

    Hi

    If I have a loan that is rollover from 15 Dec 04 till 28 Mar 05. I need a formula to autoculate the accrued no of days for interest in Jan, Feb and Mar. ie Jan =31 days, Feb = 28 days and Mar = 28 days.

    Is it possible?

    thks for helping

  8. #8
    Registered User
    Join Date
    06-28-2005
    Posts
    4

    Exclamation Please start your own discussion thread

    Jesline,

    I'm still trying to figure out my issue. Please start your own discussion thread concerning your inquiry. Thanks.

    Larry

  9. #9
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  10. #10
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  11. #11
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  12. #12
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  13. #13
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  14. #14
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  15. #15
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  16. #16
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  17. #17
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  18. #18
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  19. #19
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  20. #20
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  21. #21
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  22. #22
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  23. #23
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  24. #24
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  25. #25
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  26. #26
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  27. #27
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  28. #28
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  29. #29
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  30. #30
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  31. #31
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  32. #32
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  33. #33
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  34. #34
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  35. #35
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  36. #36
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  37. #37
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  38. #38
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  39. #39
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  40. #40
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  41. #41
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  42. #42
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  43. #43
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  44. #44
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  45. #45
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  46. #46
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  47. #47
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  48. #48
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  49. #49
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    One way:

    =INT(A2-A1) & " Days, " & TEXT(MOD(A2-A1,1), "h"" Hrs, ""m"" Min,
    ""s"" Sec""")

    In article <[email protected]>,
    lnapier <[email protected]> wrote:

    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec


  50. #50
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Another way:
    in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


    lnapier wrote:
    > How do I obtain the days, hours, min and sec between two date/time
    > stamps represented in an excel spreadsheet?
    >
    > For example:
    >
    > I have "4/6/2005 10:00:00 AM" in cell A1 and "4/4/2005 7:00:00 AM" in
    > cell A2. How can I obtain the dd:hh:mm:ss between both date/time stamps
    > in cell A3?
    >
    > A
    > _________________
    >
    > 1 4/6/2005 10:00:00 AM
    > 2 4/4/2005 7:00:00 AM
    > 3 ??Days, ??Hrs, ??Min, ??Sec
    >
    >


  51. #51
    JE McGimpsey
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Note that "d" is the format code for day of the month, so this will give
    the wrong result if the user's date system setting is the 1904 system.

    Likewise it will be wrong if the elapsed time is more than 31 days.


    In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    wrote:

    > in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    > Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


  52. #52
    LenB
    Guest

    Re: Difference between two Excel Date/Time Stamps

    Ooops. My mistake. Thanks for pointing it out.
    Len

    JE McGimpsey wrote:
    > Note that "d" is the format code for day of the month, so this will give
    > the wrong result if the user's date system setting is the 1904 system.
    >
    > Likewise it will be wrong if the elapsed time is more than 31 days.
    >
    >
    > In article <mWqwe.1823172$6l.6237@pd7tw2no>, LenB <[email protected]>
    > wrote:
    >
    >
    >>in A3, =A1-A2 or maybe =abs(A1-A2) if A2 is not always earlier.
    >>Format A3 as custom with: d"Days," h"Hrs," m"Min," s"Sec"


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1