SOLVED

Calculating duration between two dates, return result in Year Month & Day count

Copper Contributor

Hello, I have a spreadsheet with hire dates listed in a column. I need to count the duration of time between the hire date and a date in another column. I want the return answer to show in year, month and days. I am using the function listed below which gives me the number of years, but what do I add to that function to also receive the months and days too? 

 

=DATEDIF(B3,F3,"Y")

4 Replies
best response confirmed by Stasha_MAPI (Copper Contributor)
Solution

@Stasha_MAPI Try this:

=DATEDIF(B3,F3,"Y")&"yr, "&DATEDIF(B3,F3,"YM")&"mth "&DATEDIF(B3,F3,"MD")&"d"

Screenshot 2023-02-11 at 08.07.29.png

@Riny_van_Eekelen Thank you so much, this works perfectly!

What if I only have the hire date in a column and I need to calculate how many years/months/days to 12/31/2022 which is not a date on the spreadsheet, is that possible? Thank you so much for your help!

@Stasha_MAPI If I understand you correctly, try and replace F3 (the end date) with DATE(2022,12,31)

@Riny_van_Eekelen
Yes, that does it. Thank you so very much!!
1 best response

Accepted Solutions
best response confirmed by Stasha_MAPI (Copper Contributor)
Solution

@Stasha_MAPI Try this:

=DATEDIF(B3,F3,"Y")&"yr, "&DATEDIF(B3,F3,"YM")&"mth "&DATEDIF(B3,F3,"MD")&"d"

Screenshot 2023-02-11 at 08.07.29.png

View solution in original post