Difference in 2 dates

  • Thread starter Thread starter Gerry
  • Start date Start date
G

Gerry

A little help please:

I have an order date 20030110 and a ship date 20030405.
What is the formula for calculating?

Thanks for your help.It is very much appreciated.

Gerry
 
You realize that those are not really dates, there is no way excel can see a
difference
between the date and the number 20030110, there are some workarounds though.
You could use data>text to columns to convert them to real dates, select the
column,
click next twice and under column data format select date and YMD, click
finish.
Then just subtract like

=shipdate-orderdate

or

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

where A2 holds the shipping date and A1 the order date, note that the DATE
function make excel format result as dates so the result will look like a
date from 1900, just re-format the cell as General and you'll get 85 in this
case
 
Thank you all for your assistance. I have successfully
solved my problem. Have a great weekend!

Gerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top