Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
show in text format the difference between 2 dates
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. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
show in text format the difference between 2 dates
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. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
show in text format the difference between 2 dates
See:
http://www.cpearson.com/excel/datedif.aspx -- Gary''s Student - gsnu200767 "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. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
dates in excel show up as text numbers in merge with word doc | Excel Worksheet Functions | |||
how do i format cells in excel to show difference in payment amt | Excel Discussion (Misc queries) | |||
what is the formula to show the difference between two dates | Excel Discussion (Misc queries) | |||
Format text 'dates' to real dates | Excel Worksheet Functions | |||
How to format cells to show dates as the week-ending date of that | Excel Worksheet Functions |