Excel formula separate text to date

I have an excel format, for example How to separate data below with formula and becoming date like example below?

AGH20180301 ==> 01/03/2018
PRM20170301 ==> 01/03/2017
EXE20120407 ==> 07/04/2012

Upvotes: 1

Views: 43

Answers (2)

Scott Craner
Scott Craner

Reputation: 152555

Use this formula and format it any way you want.

=--REPLACE(REPLACE(MID(A1,4,8),7,0,"-"),5,0,"-")

enter image description here

Upvotes: 1

CallumDA
CallumDA

Reputation: 12113

Based on your specific examples, this will work:

=DATE(MID(A1,4,4),MID(A1,8,2),MID(A1,10,2))

Upvotes: 2

Related Questions