Extract Date From a URL String

pilot330

Board Regular
Joined
Feb 19, 2004
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Hi,

Would really appreciate a formula to extract the date in (CELL A2) from the string below, and then have that extracted date returned in lets say (Cell C2) in the format DD/MM/YYYY.

I have lots of these, but the date is always located between the sixth and seventh forward slashes.

Thanks.

2021-01-30/1200/30/1/heed-your-hunch-at-betway-handicap
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

FormR

MrExcel MVP
Joined
Aug 18, 2011
Messages
6,535
Office Version
  1. 365
Platform
  1. Windows
the date is always located between the sixth and seventh forward slashes.

Hi, here is one option.

Book4
AB
1 https://www.timeform.com/horse-racing/racecards/lingfield-park/2021-01-30/1200/30/1/heed-your-hunch-at-betway-handicap30/01/2021
Sheet1
Cell Formulas
RangeFormula
B1B1=0+MID(A1,FIND("#",SUBSTITUTE(A1,"/","#",6))+1,10)


You may need to format the cell that contains the formula as a date.
 
Solution

pilot330

Board Regular
Joined
Feb 19, 2004
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Perfect. Thanks very much, FormR. (y)
 

Forum statistics

Threads
1,136,214
Messages
5,674,431
Members
419,508
Latest member
trinstrick

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
Top