ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Difference of two dates (https://www.excelbanter.com/excel-worksheet-functions/151768-difference-two-dates.html)

Zafar

Difference of two dates
 
Hi all, I would like to ask if anyone can suggest me a funtion or a formula
in Excel on how to calculate the difference between two dates in the format
of DD/MM/YYYY or similar to this, considering real number of days in a month.
The function DAYS 360 can calculate this, but only in terms of 30 days in a
month which does not answer my question.
Any help would be highly appreciated,
Thanks,
Zafar

excelent

Difference of two dates
 
A1=01-01-2007
A2=13-01-2007
A3=A2-A1 and userformat d
------ OR ---------------
A3=--TEXT(A2-A1;"d") and format as number
------ OR ----------------
DATEDIF


"Zafar" skrev:

Hi all, I would like to ask if anyone can suggest me a funtion or a formula
in Excel on how to calculate the difference between two dates in the format
of DD/MM/YYYY or similar to this, considering real number of days in a month.
The function DAYS 360 can calculate this, but only in terms of 30 days in a
month which does not answer my question.
Any help would be highly appreciated,
Thanks,
Zafar


papou

Difference of two dates
 
Hi Zafar
=DATEDIF(startdate,enddate,"d")

HTH
Cordially
Pascal

"Zafar" a écrit dans le message de news:
...
Hi all, I would like to ask if anyone can suggest me a funtion or a
formula
in Excel on how to calculate the difference between two dates in the
format
of DD/MM/YYYY or similar to this, considering real number of days in a
month.
The function DAYS 360 can calculate this, but only in terms of 30 days in
a
month which does not answer my question.
Any help would be highly appreciated,
Thanks,
Zafar




David Biddulph[_2_]

Difference of two dates
 
The suggestion:
A3=A2-A1 and userformat d
is wrong.
Format should be General or Number, not d. [Try it when the number of days
difference gets more than 31.]

Same problem with:
A3=--TEXT(A2-A1;"d") and format as number [Again, try it when the number
of days difference gets more than 31.]

Just use =A2-A1 and format as General or Number.
--
David Biddulph

"excelent" wrote in message
...
A1=01-01-2007
A2=13-01-2007
A3=A2-A1 and userformat d
------ OR ---------------
A3=--TEXT(A2-A1;"d") and format as number
------ OR ----------------
DATEDIF


"Zafar" skrev:

Hi all, I would like to ask if anyone can suggest me a funtion or a
formula
in Excel on how to calculate the difference between two dates in the
format
of DD/MM/YYYY or similar to this, considering real number of days in a
month.
The function DAYS 360 can calculate this, but only in terms of 30 days in
a
month which does not answer my question.
Any help would be highly appreciated,
Thanks,
Zafar





All times are GMT +1. The time now is 06:35 AM.

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