Extracting Date from cell with Day and Date Data

Thresh1642

New Member
Joined
Mar 14, 2017
Messages
11
Hi,

I have a series of dates that include the day and the date:
Mon, 3/4/2020
Tue, 3/12/2020
Wed, 3/20/2020
Thu, 3/28/2020

<tbody>
</tbody>

I need to calculate the number of says between the dates, but to do that need to get the date out of the cell and keep it as a date.

I tried RIGHT(A1,9), and that returns 3/4/2020 with a space in front of the 3.
Doing the same to the next value returns 3/12/2020 with a space in front of the 3.
Doing A2-A1 returns the #VALUE ! error, because the forula is seeing the result of the RIGHT as text and not a date? I tried formatting the result to a date format, and either it didn't work or I am missing something, and given the number of PBKAC moments I've had today, I suspect the latter.

Thanks for the help,

Todd
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
You can extract the date portion as a date, like this:
Code:
=DATEVALUE(MID(A1,FIND(" ",A1)+1,10))

So, if you wanted to do the substraction of A2-A1 in one step, try this:
Code:
=DATEVALUE(MID(A2,FIND(" ",A2)+1,10))-DATEVALUE(MID(A1,FIND(" ",A1)+1,10))
 
Upvote 0
You are welcome.
Glad to help!:)
 
Upvote 0
Hi,

If we are doing arithmetic with the extracted "dates", we won't need to convert them:

B1 Extracts and Converts column A Dates.
C1 Extracts and Subtracts A1 Date from A2 Date:


Book1
ABC
1Mon, 3/4/20203/4/20208
2Tue, 3/12/20203/12/20208
3Wed, 3/20/20203/20/20208
4Thu, 3/28/20203/28/2020
Sheet622
Cell Formulas
RangeFormula
B1=MID(A1,FIND(",",A1)+2,99)+0
C1=MID(A2,FIND(",",A2)+2,99)-MID(A1,FIND(",",A1)+2,99)
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,816
Members
449,049
Latest member
cybersurfer5000

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top