You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Date Subtraction: Correcting Format from Duration to Number

I need assistance calculating the number of years, months, and days between two dates. When I subtract B1 and B2, it shows the result in a duration format, even after changing it to a number format. The formula works fine and provides the desired result as long as the data is in number format, as shown in my screenshot.

MacBook Pro 14″, macOS 14.6

Posted on Sep 12, 2024 10:15 AM

Reply
Question marked as Top-ranking reply

Posted on Sep 12, 2024 2:45 PM

You can use this formula

B3=DATEDIF(B1,B2,"Y")&" years, "&DATEDIF(B1,B2,"YM")&" month, "&DATEDIF(B1,B2,"MD")&" days"


DATEDIF - Apple Support

It knows if a years has 365 or 366 days and also what month has 31, 30, 29 or 28 days.


Hope this will help


Regards Ralf


2 replies

Date Subtraction: Correcting Format from Duration to Number

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.