Extracting a date

RID

New Member
Joined
Dec 17, 2009
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Good Morning

Is it possible to use a formula to extract a date from automated assigned ID. For instance our software for reporting incidents produces an ID number which is in the form of text and numbers AC-INC-20180511-005 for example. The date is the number 8 figure number within this produced number in YYYYMMDD format, is there a formula that can be used to extract this number into another cell without having to manually input?

regards

Neil
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
See if this helps.

=0+TEXT(MID(A1,FIND("-20",A1)+1,8),"00\/00\/00")
 
Upvote 0
Steve you are a legend thank you very much worked perfect
 
Upvote 0
If your ID numbers always consist of 2 characters, a dash, 3 more characters, another dash and then the 8-digit date value, then you can use this formula to retrieve the date...

=0+TEXT(MID(A1,8,8),"0000-00-00")

This returns the date serial number so you will need to then format the cell you put this formula in with the date format of your choosing.
 
Upvote 0

Forum statistics

Threads
1,215,326
Messages
6,124,267
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