+ Reply to Thread
Results 1 to 12 of 12

Calculate date format and age after certain years

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Calculate date format and age after certain years

    Given: Birthday is May 02, 1972, today's day is Feb. 23, 2018.

    I tried to determine the current age in decimal, I use (02/23/2018 - 05/02/1972)/365 = 45.8438356 years
    After 11.372 years, I add 11.372 years + 45.8438356 years = 57.2158 years

    So after 11.372 years at 57,2158 years old ......
    1. What will the date in MM/DD/YYYY format
    2. Age in years, months, days format?
    I tried do this: 57 years, 0.2158*12=2.5896 = 2 months, 0.5896*(265/12)=17.9337 days = 17 days.
    I use INT to drop the numbers after the decimal places even the result is 17.9337. I think it is right but not sure if it is the
    best way.

    Please note birthday and 11.372 years are variable values, not a fix value.

    I am looking for help using functions not VBA.


    Thanks
    Last edited by Rocky2013; 02-24-2018 at 11:03 PM.

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Calculate date format and age after certain years

    With DOB in A2 and =TODAY() in B2, a simple formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    DOB 25/12/1925 = 92.16897744 years

    OR....
    The number of years (y) = (year of previous birthday) - (year of birth)
    The number of days (d) = serial value(today) - serial value(day of previous birthday)
    Days between birthdays (b) = serial value(next birthday) - serial value(previous birthday)
    Decimal = y + (d/b)

    With DOB in A2 and =TODAY() in B2
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    DOB 25/12/1925 = 92.16712329
    =INT((B2-A2)/365)+((B2-EDATE(A2,(DATEDIF(A2,B2,"y"))*12))/(EDATE(A2,(DATEDIF(A2,B2,"y")+1)*12)-EDATE(A2,(DATEDIF(A2,B2,"y"))*12)))

    Explained as follows:

    Years
    =INT((B2-A2)/365)

    Days between last birthday and next one (either 365 or 366)
    =EDATE(A2,(DATEDIF(A2,B2,"y")+1)*12)-EDATE(A2,(DATEDIF(A2,B2,"y"))*12)

    Days since last birthday
    =B2-EDATE(A2,(DATEDIF(A2,B2,"y"))*12)
    Last edited by kev_; 02-24-2018 at 02:22 AM.
    Click *Add Reputation to thank those who helped you. Ask if anything is not clear

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Calculate date format and age after certain years

    I want to be accurate as possible. The format, today's date - birthday/365, I pick up from web site when I search.
    Your formula came out Decimal = y + (d/b) = 45.81369863 which properly more accurate than what I have 45.8438356.

    I still need to know 57.18569863 years (by adding 11.372 + 45.81369863) to determine its
    Date format of 57.185698630137 mm/dd/yyyy?
    Age format of 57.185698630137 ?years, ? Months, ?Days

    Attached is the sample.

  4. #4
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,908

    Re: Calculate date format and age after certain years

    Try:

    =TEXT(SUMPRODUCT(DATEDIF(0,B12*365.25,{"y","ym","md"})*{10000,100,1}),"#0"" years ""00"" month ""00"" days""")

  5. #5
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Calculate date format and age after certain years

    B2=Birthday
    B3=Today's Date
    B4=No. of years after

    B5 = No.of years after*365
    In B6 Use Below formula

    =DATEDIF(B2,B5,"Y")&" Y " &DATEDIF(B2,B5,"YM")&" M " &DATEDIF(B2,B5,"MD")&" D"
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  6. #6
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Calculate date format and age after certain years

    ?years, ? Months, ?Days
    with DOB in A2, today's date in B2

    years
    =DATEDIF(A2,B2,"y")
    months
    =DATEDIF(A2,B2,"ym")
    days
    =DATEDIF(A2,B2,"md")

  7. #7
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Calculate date format and age after certain years

    I think this is easy to find today's age than the formula at the top.
    The result from above are 92 years, 1 month, 29 days. This is the age based on today's date of 23/02/2018.

    What is the date format in dd/mm/yyyy after 11.372 year later? Note: I follow your date dd/mm/yyyy, I typical use mm/dd/yyyy.

    If I use the first formula you provide =INT((B2-A2)/365)+((B2-EDATE(A2,(DATEDIF(A2,B2,"y"))*12))/(EDATE(A2,(DATEDIF(A2,B2,"y")+1)*12)-EDATE(A2,(DATEDIF(A2,B2,"y"))*12)))
    your result shows today's age = 92.16712329; but I use the same formula I got 92.16438 a small difference.

    To find the age after 11.372 years, I use 92.16712329 + 11.372 = 103.5391
    Since your formua is calculate based on date format dd/mm/yyyy, I could not use the above to calculate the age after 11.372 years later.

    I could use =MID(103.5391,1,FIND(".",103.5391,1)-1) = 103 years MID(103.5391,1,FIND(".",103.5391,1)-1) = 103
    then use 0.5391*12=6.4692=6 months, then 0.4692*(365/12)=14.2715=14 days

    OR
    Use Phuocam's formula, =TEXT(SUMPRODUCT(DATEDIF(0,B12*365.25,{"y","ym","md"})*{10000,100,1}),"#0"" years ""00"" month ""00"" days""")

    I still get stuck to find the the date format dd/mm/yyyy or mm/dd/yyyy, knowing the age is 103.5391 years old. For the year, 103-92+2018=29, so dd/mm/2029

    Can you please advise the date format at age 103.5391 years old.

    Thanks
    Last edited by AliGW; 02-24-2018 at 10:22 AM. Reason: Unnecessary quotation removed.

  8. #8
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Calculate date format and age after certain years

    The result of the age after 11.372 years is "57 years, 02 months, 08 days". It seems correct.

    What about the date format in mm/dd/yyyy? I think the year = 57-45+2018=2030 so mm/dd/2030


    Thanks

  9. #9
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Calculate date format and age after certain years

    Thanks for the feed back, but the result is #NUM!.

    I use the following:
    B2=DOB (Birthday) = 5/2/1972
    B3=Today's Date = 2/23/2018
    B4=No. of years after = 11.372

    B5 = No.of years after*365 = 11.372*365=4150.78
    In B6 Use Below formula

    =DATEDIF(B2,B5,"Y")&" Y " &DATEDIF(B2,B5,"YM")&" M " &DATEDIF(B2,B5,"MD")&" D" the result is #NUM!

    I think this formula suppose to get the age after 11.372 years. What about date format mm/dd/yyyy?

    Thanks

  10. #10
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Calculate date format and age after certain years

    @Rocky2013
    You are confusing things for yourself by working in YEARS
    In Excel Dates are DAYS
    Excel Day 1 = 1/1/1900, Excel Day 43155 = TODAY Feb 24, 2018
    (So, according to Excel, the world is 43155 DAYS old!)

    Start again and calculate in DAYS

    DOB 02/05/1972 (mm/dd/yyyy) = 26334
    Today 02/24/2018 (mm/dd/yyyy) = 43155
    Age = 43155 - 26334 = 16821 DAYS old

    Do not add 11.372 YEARS
    You used 365 in your calculations, so I think 11.372 X 365 = 4151 DAYS
    Today + 4151 DAYS = 43155 + 4151 = 47306
    47306 formatted as a date = 07/07/2029

    DOB + AGE IN DAYS + VALUE ADDED
    26334 + 16821 + 4151 = 47306
    47306 formatted as a date = 07/07/2029

    To allow cell value to be formatted as a date, the underlying cell value should be in days

    Can you please advise the date format at age 103.5391 years old
    No - that is not a date. It is a number of years - which not the same thing
    Last edited by kev_; 02-24-2018 at 01:39 PM.

  11. #11
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,914

    Re: Calculate date format and age after certain years

    See the attached file

  12. #12
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Calculate date format and age after certain years

    Hi kelv,
    Indeed I confuse myself with days and date.

    After I try your new method, your method makes it very simple and it works
    what I want.

    Also thanks others who provide me the help. I am sorry for all the confusion make it more
    difficult.


    Thanks
    Last edited by Rocky2013; 02-24-2018 at 11:02 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Calculate Date 5 years in the future past today's date
    By RickCJ7 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-29-2015, 05:50 PM
  2. Replies: 0
    Last Post: 01-23-2012, 05:15 PM
  3. Replies: 1
    Last Post: 06-29-2006, 09:30 AM
  4. Replies: 2
    Last Post: 02-28-2006, 04:25 PM
  5. [SOLVED] calculate no. of years between a date and today's date
    By Aladin Akyurek in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 06:05 AM
  6. calculate no. of years between a date and today's date
    By Sue in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] calculate date differences in years and months
    By Joyce in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-14-2005, 02:06 PM

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