ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   date formats (https://www.excelbanter.com/excel-discussion-misc-queries/89015-date-formats.html)

Matt

date formats
 
I have a cell that works out how many days someone has worked in my company
for. However, I'm trying to change the format of that cell so rather than it
saying, for example 743 as days, I want it to show as years, months, days i.e
2:01:15

Any ideas?

David Biddulph

date formats
 
"Matt" wrote in message
...
I have a cell that works out how many days someone has worked in my company
for. However, I'm trying to change the format of that cell so rather than
it
saying, for example 743 as days, I want it to show as years, months, days
i.e
2:01:15


=DATEDIF(A1,A2,"y")&":"&DATEDIF(A1,A2,"ym")&":"&DA TEDIF(A1,A2,"md")

.... (but for inputs of 0 and 743 it gives 2:0:12, not your 2:01:15).
--
David Biddulph



Niek Otten

date formats
 
See

http://www.cpearson.com/excel/datedif.htm

--
Kind regards,

Niek Otten

"Matt" wrote in message ...
|I have a cell that works out how many days someone has worked in my company
| for. However, I'm trying to change the format of that cell so rather than it
| saying, for example 743 as days, I want it to show as years, months, days i.e
| 2:01:15
|
| Any ideas?




All times are GMT +1. The time now is 10:56 AM.

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