Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel Calculate the date difference from today from a cell of "7/6/2012 10:26:42"

Tags:

date

excel

So I have a cell with 7/6/2012 10:26:42 inputted, I want to show the date difference from today in another cell.

I tried to extract 7/6/2012 with =LEFT(A1, Find(" ", A1, 1) -1) but turned out theres a value error.

The formula works when I make A1 '7/6/2012 10:26:42, however it is not ideal because I have to work with the whole column.

like image 217
user1441705 Avatar asked Jun 07 '12 08:06

user1441705


1 Answers

For the difference between A1 and Today's date you could enter: =ABS(TODAY()-A1)

which returns the (fractional) number of days between the dates.

You're likely getting a #VALUE! error in your formula because Excel treats dates as numbers.

like image 117
lori_m Avatar answered Oct 23 '22 20:10

lori_m