ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   count the days between 2 dates and convert (https://www.excelbanter.com/excel-programming/396769-count-days-between-2-dates-convert.html)

santaviga

count the days between 2 dates and convert
 
Hi, I have the following in data in cells and I want to calculate the days
between 2 date, which I can do, it returns 2316 days.

cell A1 is 30/04/2001
cell A2 is =Today()
cell A3 =SUM(A2-A1) returns 2316 days

I need to convert this figure into Years, Months and Days. e.g. 6 years 4
months and 3 days.

Does anyone have any idea on a formula for this?

Regards

MN

Dave Peterson

count the days between 2 dates and convert
 
First, you don't need the =sum() around your subtraction.

=a2-a1
would work ok.

For the other stuff, look at Chip Pearson's notes for =DateDif():
http://www.cpearson.com/excel/datedif.htm

santaviga wrote:

Hi, I have the following in data in cells and I want to calculate the days
between 2 date, which I can do, it returns 2316 days.

cell A1 is 30/04/2001
cell A2 is =Today()
cell A3 =SUM(A2-A1) returns 2316 days

I need to convert this figure into Years, Months and Days. e.g. 6 years 4
months and 3 days.

Does anyone have any idea on a formula for this?

Regards

MN


--

Dave Peterson

Don Guillett

count the days between 2 dates and convert
 
=DATEDIF(A1,A2,"y")&"years,
"&DATEDIF(A1,A2,"ym")&"months"&DATEDIF(A1,A2,"md") &" days"

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"santaviga" wrote in message
...
Hi, I have the following in data in cells and I want to calculate the days
between 2 date, which I can do, it returns 2316 days.

cell A1 is 30/04/2001
cell A2 is =Today()
cell A3 =SUM(A2-A1) returns 2316 days

I need to convert this figure into Years, Months and Days. e.g. 6 years 4
months and 3 days.

Does anyone have any idea on a formula for this?

Regards

MN



santaviga

count the days between 2 dates and convert
 
Thanks a lot guys worked a treat. Regards Mark

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"santaviga" wrote in message
...
Hi, I have the following in data in cells and I want to calculate the days
between 2 date, which I can do, it returns 2316 days.

cell A1 is 30/04/2001
cell A2 is =Today()
cell A3 =SUM(A2-A1) returns 2316 days

I need to convert this figure into Years, Months and Days. e.g. 6 years 4
months and 3 days.

Does anyone have any idea on a formula for this?

Regards

MN




Don Guillett

count the days between 2 dates and convert
 

Glad to help
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"santaviga" wrote in message
...
Thanks a lot guys worked a treat. Regards Mark

"Don Guillett" wrote:

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

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"santaviga" wrote in message
...
Hi, I have the following in data in cells and I want to calculate the
days
between 2 date, which I can do, it returns 2316 days.

cell A1 is 30/04/2001
cell A2 is =Today()
cell A3 =SUM(A2-A1) returns 2316 days

I need to convert this figure into Years, Months and Days. e.g. 6 years
4
months and 3 days.

Does anyone have any idea on a formula for this?

Regards

MN






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

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