Excel formula to extract date from large text field

djredden73

New Member
Joined
Aug 10, 2012
Messages
29
I have a set of data where a large text field contains a date after a specific set of words.

Example:
In
Text Field
Date (Formula)
Here is where the large text field is and there will be a lot
of text in here.
Around this point of the text (but not always exact position) there will be this phrase:
Released Date: 30.05.2008 (this is the date format)
I would like to have an excel formula in the next cell that extracts 30.05.2008 - and preferably convert to 5/30/2008
5/30/2008

<tbody>
</tbody>

Please help with a formula that can extract that for me.

Thank you
 
For those date/time text values...

The date: =0+LEFT(A1,SEARCH(" at",A1))

The time: =0+RIGHT(REPLACE(A1,LEN(A1)-1,0," "),7)

These formulas will return date and time serial numbers so you will need to format their cells with the desired date and time formats that you want them displayed as.

AWESOME! Thank you very much, that worked perfectly@
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
For those date/time text values...

The date: =0+LEFT(A1,SEARCH(" at",A1))

The time: =0+RIGHT(REPLACE(A1,LEN(A1)-1,0," "),7)

These formulas will return date and time serial numbers so you will need to format their cells with the desired date and time formats that you want them displayed as.


This is great, thank you for sharing! In my case, the date formula that you provided worked perfectly to extra the data, but my source times are formatted a bit differently than in Luigi802's examples: (The hour varies between one or two digits, seconds are included followed by a space, and it varies between AM/PM.)

Example:

November 6, 2019 at 8:58:00 AM
August 3, 2018 at 10:53:03 AM
June 4, 2016 at 4:33:05 PM

Is it possible to modify your original time extraction formula to work with the examples above? Thank you in advance!
 
Upvote 0
This is great, thank you for sharing! In my case, the date formula that you provided worked perfectly to extra the data, but my source times are formatted a bit differently than in Luigi802's examples: (The hour varies between one or two digits, seconds are included followed by a space, and it varies between AM/PM.)

Is it possible to modify your original time extraction formula to work with the examples above? Thank you in advance!
All that was needed was to change the 7 to an 11 to get the time part for your text...

=0+RIGHT(REPLACE(A1,LEN(A1)-1,0," "),11)
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,270
Members
449,149
Latest member
mwdbActuary

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