+ Reply to Thread
Results 1 to 6 of 6

How to calculate date of birth by total number of Years months days

  1. #1
    Registered User
    Join Date
    01-13-2017
    Location
    EgYpT
    MS-Off Ver
    2010
    Posts
    36

    Question How to calculate date of birth by total number of Years months days

    Hello every one

    i have some people birthdates

    i calculated how old are they by years months days in a specific date ( 01/10/2020 )

    now i want to revers it

    i want to calculate date of birth by total number of Years months days in same date ( 01/10/2020 )

    i wrote this formula

    =DATE(YEAR($C$1)-D3,MONTH($C$1)-C3,DAY($C$1)-B3)

    but it is not working to calculate right date of birth in all column

    some of it is right the others is wrong i do not know why

    excel sheet attached

    thanks

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: How to calculate date of birth by total number of Years months days

    Hi Elloli,

    Because you are off by a single day, I'd guess you are missing those leap years where February has 29 days instead of 28.
    Read https://www.learntocalculate.com/how...%20leap%20year.
    where the leap years are divisible by 4.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    01-13-2017
    Location
    EgYpT
    MS-Off Ver
    2010
    Posts
    36

    Re: How to calculate date of birth by total number of Years months days

    Quote Originally Posted by MarvinP View Post
    Hi Elloli,

    Because you are off by a single day, I'd guess you are missing those leap years where February has 29 days instead of 28.
    Read https://www.learntocalculate.com/how...%20leap%20year.
    where the leap years are divisible by 4.
    so what should i change here

    =DATE(YEAR($C$1)-D3,MONTH($C$1)-C3,DAY($C$1)-B3)

    to solve leap years problem

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,552

    Re: How to calculate date of birth by total number of Years months days

    Most of the "not equal" dates are out by 1 day. However, the dates for the month of February are out by -2 days.

    Not sure how to fix it but seeing the pattern may help.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,077

    Re: How to calculate date of birth by total number of Years months days

    Microsoft has stopped documenting DATEDIF. This may be due to the strange anomaly when trying to calculate the gap between 31/01 to the 01/03 in a non-leap year which will result in 1 month - 2 days. It was probably easier to stop documenting DATEDIF than to explain why this happens.

    when the difference is manually counted, and entered into days/months, then your reverse calculation is correct, so the problem is with obtaining the difference by using DATEDIF.
    Last edited by janmorris; 08-28-2021 at 08:57 PM.

  6. #6
    Valued Forum Contributor janmorris's Avatar
    Join Date
    07-24-2021
    Location
    Japan
    MS-Off Ver
    Google Sheets (& Mac 2021)
    Posts
    1,077

    Re: How to calculate date of birth by total number of Years months days

    in cell B3, place this formula, then drag down to all other cells:
    Please Login or Register  to view this content.

+ 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. Replies: 2
    Last Post: 02-28-2006, 04:25 PM
  2. [SOLVED] Function to calculate the number of years, months and days between
    By Biff in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-06-2005, 03:05 PM
  3. [SOLVED] Function to calculate the number of years, months and days between
    By Vicky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  4. Function to calculate the number of years, months and days between
    By Biff in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 04:05 AM
  5. Function to calculate the number of years, months and days between
    By Vicky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. Function to calculate the number of years, months and days between
    By Vicky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  7. [SOLVED] Function to calculate the number of years, months and days between
    By Vicky in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  8. Function to calculate the number of years, months and days between
    By Vicky in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2005, 12:05 AM

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