ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Date String (https://www.excelbanter.com/excel-discussion-misc-queries/132655-date-string.html)

Jester

Date String
 
I have 2 dates and I want to calculate the difference expressed as the
following string:

(eg) 9 Years 3 months and 13 days

Can anyone help?

Many Thanks

John - Sydney Aust.



RichardSchollar[_2_]

Date String
 
Hi John

Assuming earlier date in A1 and later date in A2 then you can use the
following formula:

=DATEDIF(A1,A2,"y") & " years " & DATEDIF(A1,A2,"ym") & " months and "
& DATEDIF(A1,A2,"md") & " days"

Hope this helps!

Richard


On 28 Feb, 09:35, "Jester" wrote:
I have 2 dates and I want to calculate the difference expressed as the
following string:

(eg) 9 Years 3 months and 13 days

Can anyone help?

Many Thanks

John - Sydney Aust.





All times are GMT +1. The time now is 11:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com