![]() |
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? |
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 |
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? |
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? |
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