Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
ahsan
 
Posts: n/a
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.misc
SteveG
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
Philip Reece-Heal
 
Posts: n/a
Default 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?



  #4   Report Post  
Posted to microsoft.public.excel.misc
JE McGimpsey
 
Posts: n/a
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.misc
Michael
 
Posts: n/a
Default 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?

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
Dates and Recomended Graphing Programs to work with excel? John Charts and Charting in Excel 2 December 8th 05 07:58 PM
to find number of days between 2 dates using vba code in excel sjayar Excel Discussion (Misc queries) 3 November 3rd 05 06:24 AM
Why won't it Excel fill in weekly dates now, changes them to daily Larry Excel Worksheet Functions 1 April 6th 05 12:57 PM
Ensure dates imported into Excel 2003 are shown in DD/MM/YYY form. KymY Excel Discussion (Misc queries) 3 February 11th 05 02:28 PM
Subracting Dates to come up with the # of days between them KimberlyC Excel Worksheet Functions 8 December 20th 04 09:46 PM


All times are GMT +1. The time now is 08:50 PM.

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

About Us

"It's about Microsoft Excel"