Datedif issue - convert number of days to --Years--Months--Days format

0 votes

I should change the structure of the days to "—Years—Months—Days." Most of my calculations involve working day percentages.

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

is effective for date-to-date. I need the day counts in this case. in the format "—Years—Months—Days."

like: 10 September 2021 to 1 March 2023 (546 days) 75% of 546 is 409.5 I have to figure out how many years, months, and days there are in 409.5. Can it be done?

Jan 30, 2023 in Others by Kithuzzz
• 38,010 points
313 views

1 answer to this question.

0 votes

Try,

=DATEDIF(0,DATEDIF(B2,C2,"D")*0.75,"Y") & " Years, " & DATEDIF(0,DATEDIF(B2,C2,"D")*0.75,"YM") & " Months, " & DATEDIF(0,DATEDIF(B2,C2,"D")*0.75,"MD") & " Days"
answered Jan 30, 2023 by narikkadan
• 63,420 points

Related Questions In Others

–2 votes
0 answers
0 votes
1 answer

Change date format of cell in excel from dd.mm.yyyy to yyy/mm/dd ( excel version 2013 )

Hello :)   Excel’s Format Cells function can quickly ...READ MORE

answered Feb 9, 2022 in Others by gaurav
• 23,260 points
1,331 views
0 votes
0 answers

Convert Rows to Columns with values in Excel using custom format

1 I having a Excel sheet with 1 ...READ MORE

Feb 17, 2022 in Others by Edureka
• 13,670 points
733 views
+1 vote
1 answer

How To Create Phone Number Format XXX-XXX-XXXX In Android

 can try: private String formatNumbersAsCode(CharSequence s) { ...READ MORE

answered Jun 14, 2022 in Others by polo
• 1,480 points
8,331 views
0 votes
1 answer

Excel feet and inches to millimeters

There are certain direct formulas to convert ...READ MORE

answered Feb 23, 2022 in Database by gaurav
• 23,260 points
1,389 views
0 votes
1 answer

Convert image (jpg, png, jpeg) to base64

Try this - it will perform the ...READ MORE

answered Sep 24, 2022 in Others by narikkadan
• 63,420 points
699 views
0 votes
1 answer

Excel COUNTIF formula

Please see MS Excel: COUNTIF Function (WS) You should ...READ MORE

answered Sep 29, 2022 in Others by narikkadan
• 63,420 points
564 views
0 votes
1 answer

Is there a maximum number of formula fields allowed in Excel (2010)

See http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010073849.aspx for limits on specs it doesn't indicate ...READ MORE

answered Sep 30, 2022 in Others by narikkadan
• 63,420 points
421 views
0 votes
1 answer

How can this code be modified to increase the number of months instead of days?

You have to use dateadd. For i = 1 ...READ MORE

answered Feb 3, 2023 in Others by narikkadan
• 63,420 points
291 views
0 votes
1 answer

Convert Excel to PDF issue with documents4j

MS Excel may not always be used ...READ MORE

answered Sep 26, 2022 in Others by narikkadan
• 63,420 points
1,117 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP