+ Reply to Thread
Results 1 to 10 of 10

Calulate the number of years and months from a specific date

Hybrid View

  1. #1
    Registered User
    Join Date
    09-23-2003
    Location
    California
    Posts
    38

    Calulate the number of years and months from a specific date

    I would like to calculate the number of years and months that have passed since a certain date. Would like it in a number format so I can pickout those who have gone reached 5 year increments during each month.

    Such as someone reaching 40 injury free years in June of this year I can let them know.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So what exactly would the format of the answer be?

    given 2 dates... say June 1, 2007 and August 8, 2008 for example
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    09-23-2003
    Location
    California
    Posts
    38

    Example

    I am trying to determine when someone has reached 5, 10, 15, etc years injury free years.


    A B C
    no. yrs/mts reached 5, 10
    Date Hired worked 15, etc years

    10-01-1969 39 yrs 1 month will show 5
    today years in Oct

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    huh? Don't get it.

  5. #5
    Registered User
    Join Date
    09-23-2003
    Location
    California
    Posts
    38

    more description

    I need to calculate the number of years and months, shown by a number, since a certain date. Like how many years and months someone has worked since they were hired.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    So do you mean?

    =DATEDIF(A5,TODAY(),"y")&" years and "&DATEDIF(A5,TODAY(),"ym")&" months"

    where A5 contains Start Date

  7. #7
    Registered User
    Join Date
    09-23-2003
    Location
    California
    Posts
    38

    Smile Thank, need shown different

    Thanks, that works, but I ment to say I need to show the months as a descimal.

  8. #8
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    You mean?

    =DATEDIF(A5,TODAY(),"y")&" years and "&ROUND(DATEDIF(A5,TODAY(),"ym")/12,2)&" months"

    or

    =(TODAY()-A5)/12 (formatted as General) for total months between dates

  9. #9
    Registered User
    Join Date
    09-23-2003
    Location
    California
    Posts
    38

    Thanks, rest of problem

    Thanks, I put it in years with descimal by deviding by 365 instead of 12. The next part I needed was to show if the number of years equals 5, 10, 15, 20, 25, 30 40, etc, years to indicate that in another column and if it doesn't equal one of those numbers show a N in the column

  10. #10
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Maybe:

    =If(MOD(INT((TODAY()-A5)/365),5)=0,"Y","N")

    This will take the Year portion (or Integer portion) and check to see if it is exactly equally divisible by 5 (i.e. =5,10,15,20, etc.). If it is, then "Y" appears, else an "N" appears.

+ 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