View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
catrrmg catrrmg is offline
external usenet poster
 
Posts: 23
Default show in text format the difference between 2 dates

thanks a lot. it is really helpful!

"Nigel" wrote:

Hi catrrmg

Use the following which will return the difference between the twoi dates
where, is this example, B1 is their start date and B3 is the current date.

=DATEDIF(B1,B3,"y") & " years, " & DATEDIF(B1,B3,"ym") & " months, " &
DATEDIF(B1,B3,"md") & " days"

Hope this helps

"catrrmg" wrote:

Hi all! I've got the following to get done: I have to calculate for our
employees for how long do the work for the company. The format of the result
should look similar to "X years X months X days". Given that their number is
quite big, I'm thinking to write a function and use it wherever I need such
calculations. Does anyone have any ideas how may I get this done? Your help
is much appreciated.