ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How to calc # of days between two dates in YYYYMMDD in EXCEL. (https://www.excelbanter.com/excel-discussion-misc-queries/67081-how-calc-days-between-two-dates-yyyymmdd-excel.html)

ahsan

How to calc # of days between two dates in YYYYMMDD in EXCEL.
 
I have two dates in YYYYMMDD format in Excel. How can calculate number of
days between the two dates?

SteveG

How to calc # of days between two dates in YYYYMMDD in EXCEL.
 

Ahsan,


Assuming your dates are in A1 & B1,

=DATEDIF(A1,B1,"d")

The first date in the formula needs to be the earlier of the two.


HTH

Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php...fo&userid=7571
View this thread: http://www.excelforum.com/showthread...hreadid=504551


Philip Reece-Heal

How to calc # of days between two dates in YYYYMMDD in EXCEL.
 
If first date is in A1 and second is in A2, in A3 type the formula =A1-A2
and you will have the answer but formatted as a date, so while in the same
cell (A3) from the Format menu click on Cells and then select the Number
tab. In the box on the left select General. Answer is now a number

All the best
Philip



"ahsan" wrote in message
...
I have two dates in YYYYMMDD format in Excel. How can calculate number of
days between the two dates?




JE McGimpsey

How to calc # of days between two dates in YYYYMMDD in EXCEL.
 
One way:

=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)) -
DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2))

In article ,
"ahsan" wrote:

I have two dates in YYYYMMDD format in Excel. How can calculate number of
days between the two dates?


Michael

How to calc # of days between two dates in YYYYMMDD in EXCEL.
 
Hi ahsan. Try Chip Pearson's site: http://www.cpearson.com/excel/datedif.htm
HTH
--
Sincerely, Michael Colvin


"ahsan" wrote:

I have two dates in YYYYMMDD format in Excel. How can calculate number of
days between the two dates?



All times are GMT +1. The time now is 06:51 PM.

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