ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   compute the difference between two dates accurately (https://www.excelbanter.com/excel-discussion-misc-queries/24228-compute-difference-between-two-dates-accurately.html)

Dilly

compute the difference between two dates accurately
 
Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference between
two dates?

N Harkawat

how about simply subtracting one from another
=B1-A1
where B1 holds the end date and cell A1 the start date

Why days360 unless you want to use 360 days per year convention.


"Dilly" wrote in message
...
Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference
between
two dates?




Peo Sjoblom

=A1-B1

where A1 holds the later date and B1 the earlier date, format as general
DATE260 is an accounting function

Regards,

Peo Sjoblom

"Dilly" wrote:

Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference between
two dates?


Gord Dibben

Dilly

See Chip Pearson's site for info on the DATEDIF Function.

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


Gord Dibben Excel MVP

On Fri, 29 Apr 2005 12:46:04 -0700, "Dilly"
wrote:

Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference between
two dates?



Dilly

Thanks but I tried that. for example: 2004/05/30 - 1986/06/24 returns
1917/12/06. actual answer should be 1917/11/06. it doesn't recognize zero
month.

"N Harkawat" wrote:

how about simply subtracting one from another
=B1-A1
where B1 holds the end date and cell A1 the start date

Why days360 unless you want to use 360 days per year convention.


"Dilly" wrote in message
...
Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference
between
two dates?





Dave Peterson

If you just wanted the number of days, try formatting that cell as general.


Dilly wrote:

Thanks but I tried that. for example: 2004/05/30 - 1986/06/24 returns
1917/12/06. actual answer should be 1917/11/06. it doesn't recognize zero
month.

"N Harkawat" wrote:

how about simply subtracting one from another
=B1-A1
where B1 holds the end date and cell A1 the start date

Why days360 unless you want to use 360 days per year convention.


"Dilly" wrote in message
...
Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference
between
two dates?





--

Dave Peterson

Dilly

Thanks, but I need it in yy/mm/dd format. see gord dibben's answer below.

"Dave Peterson" wrote:

If you just wanted the number of days, try formatting that cell as general.


Dilly wrote:

Thanks but I tried that. for example: 2004/05/30 - 1986/06/24 returns
1917/12/06. actual answer should be 1917/11/06. it doesn't recognize zero
month.

"N Harkawat" wrote:

how about simply subtracting one from another
=B1-A1
where B1 holds the end date and cell A1 the start date

Why days360 unless you want to use 360 days per year convention.


"Dilly" wrote in message
...
Date360 gives an inacurate answer that over the course of 20 years can be
over a month. Is there an accurate way of computing the difference
between
two dates?




--

Dave Peterson



All times are GMT +1. The time now is 09:13 AM.

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