Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 178
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count of days between dates Andy Excel Discussion (Misc queries) 3 April 15th 09 10:51 AM
Count days inside 2 dates Call me Ana, Ana Pego New Users to Excel 2 October 20th 08 12:46 AM
need to convert list of dates to count no. of dates by week neowok Excel Worksheet Functions 13 January 30th 06 03:54 PM
convert dates to number of days milk0s Excel Worksheet Functions 2 September 28th 05 01:31 PM
count days between dates cogent Excel Programming 3 May 7th 04 07:55 AM


All times are GMT +1. The time now is 02:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"