+ Reply to Thread
Results 1 to 2 of 2

calculate time periods

  1. #1
    umba-sr
    Guest

    calculate time periods

    Hi,

    This is something that's bothered me for some time, but I was never able to
    discover the solution.

    I have a list of employees, for example, and some of them have been in the
    company since their first employment, but some of them haven't. Now, the
    other group is the one that worries me.

    Say, there is one such employee who had worked in some company prior to
    this, and then didn't work at all for several months, and only then joined
    our company.
    I know that to calculate time difference, function is DATEDIF, and when I
    add parametres to get years, months and days, formula and results look
    something like this:
    =DATEDIF(E4,TODAY(),"Y")&" years, " & DATEDIF(E4,TODAY(),"ym")&" months, " &
    DATEDIF(E4,TODAY(),"md")&" days"

    12 years, 5 months, 26 days

    And this is the period he spent in our company, plus I have the same formula
    for the time he spent in previous company, only with specific date instead of
    TODAY().

    Actual question is: How do I add these two results to get total of years,
    months and days?

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    If dates spent at previous company were, say, C4 to D4

    =DATEDIF(C4,TODAY()-E4+D4,"Y")&" years, " & DATEDIF(C4,TODAY()-E4+D4,"ym")&" months, " &
    DATEDIF(C4,TODAY()-E4+D4,"md")&" days"

+ 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