+ Reply to Thread
Results 1 to 7 of 7

subtracting time adds 1 month

  1. #1
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    272

    subtracting time adds 1 month

    In this formula, I am subtracting a 2 column date and time from another 2 column date and time, excluding Saturdays and Sundays. Somehow it seems to be adding a month to the calculation. A cell that should equal 00,00,4:56 will equal 01,00,4:56.
    Suggestions?
    HTML Code: 
    Thanks,
    Sick
    Last edited by sick stigma; 12-28-2012 at 02:35 PM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: subtracting time adds 1 month

    Can you attach a workbook with some example data?
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    272

    Re: subtracting time adds 1 month

    here is the workbook as it currently exists.
    Sick
    Attached Files Attached Files

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: subtracting time adds 1 month

    I think this might be a formatting issue.

    If I change the formatting of J16 (01,01,08:37) to dd/mm/yyyy hh:mm the result displays as 01/01/1900 08:37.

    If I do the same for J31 it displays (01,00,09:12) as 00/01/1900 09:12

  5. #5
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    272

    Re: subtracting time adds 1 month

    But in either case there was no month or year elapsed. In dd,mm,yyyy hh:mm they should be 01,00,00 8:37 and 00,00,00 9:12.
    Where is that D**N month coming from. I just can't find my mistake.
    Sick

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: subtracting time adds 1 month

    A month hasn't been added.

    The result you have is a date and the month of that date is January, so your format of mm displays 01.

  7. #7
    Forum Contributor
    Join Date
    06-20-2007
    Location
    Buckeye, AZ
    MS-Off Ver
    365
    Posts
    272

    Re: subtracting time adds 1 month

    Got it! Thanks!

+ 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