ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   DATE.DIFF results in French (https://www.excelbanter.com/excel-discussion-misc-queries/13190-date-diff-results-french.html)

jenhow

DATE.DIFF results in French
 
I am use the DATE.DIFF function to return the time elapsed between two dates
and the results come back in years, months, days. But not in English, the
results say
"1 an 2 mois 3 jour". Is there any way to fix this?

Thanks.

Ron de Bruin

Hi jenhow

Maybe you use a function from a Add-in ?

Try this one from Norman Harker with the dates in B5 and C5
You can add text yourself

=DATEDIF(B5,C5,"y") & " y " & DATEDIF(B5,C5,"ym") & " m " & DATEDIF(B5,C5,"md") & " d"

--
Regards Ron de Bruin
http://www.rondebruin.nl



"jenhow" wrote in message ...
I am use the DATE.DIFF function to return the time elapsed between two dates
and the results come back in years, months, days. But not in English, the
results say
"1 an 2 mois 3 jour". Is there any way to fix this?

Thanks.




Ron Rosenfeld

On Tue, 15 Feb 2005 09:47:02 -0800, jenhow
wrote:

I am use the DATE.DIFF function to return the time elapsed between two dates
and the results come back in years, months, days. But not in English, the
results say
"1 an 2 mois 3 jour". Is there any way to fix this?

Thanks.


DATE.DIFF is not an Excel function.

If you are using Longre's morefunc.xll add-in, then you should address your
questions to him directly.


It might be possible to nest that user function in a SUBSTITUTE worksheet
function, though.

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(DATE.DIFF(A1,A2, 3),"an","year"),"moi","month"),"jour","day")

However, this will result in months always being plural. You could certainly
test for months being equal to one, and strip off the "s" if it is.

It might be easier to use Excel's DateDif function:

=DATEDIF(A1,A2,"y")&IF(DATEDIF(A1,A2,"y")=1," yr "," yrs ")&
DATEDIF(A1,A2,"ym")&IF(DATEDIF(A1,A2,"ym")=1," month "," months ") &
DATEDIF(A1,A2,"md") & IF(DATEDIF(A1,A2,"md")=1," day", " days")



--ron


All times are GMT +1. The time now is 05:14 PM.

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