SOLVED

Transform text string into date-time

Copper Contributor

Hello,

 

Can someone help me how to transform the following text string into a proper date-time format in Excel?

 

20180709-150633

 

Thanks a lot!

 

Marc

 

2 Replies
best response confirmed by NikolinoDE (Gold Contributor)
Solution

@excelnewbie99 

=DATE(LEFT(LEFT(B3,SEARCH("-",B3)-1),4),MID(LEFT(B3,SEARCH("-",B3)-1),5,2),RIGHT(LEFT(B3,SEARCH("-",B3)-1),2))+TIME(MID(B3,10,2),MID(B3,12,2),MID(B3,14,2))

 

You can try this formula with the user defined format highlighted in the screenshot.

date time.JPG

 

@OliverScheurich 

 

This is awesome! It worked all I wanted!!! Thank you!!!

1 best response

Accepted Solutions
best response confirmed by NikolinoDE (Gold Contributor)
Solution

@excelnewbie99 

=DATE(LEFT(LEFT(B3,SEARCH("-",B3)-1),4),MID(LEFT(B3,SEARCH("-",B3)-1),5,2),RIGHT(LEFT(B3,SEARCH("-",B3)-1),2))+TIME(MID(B3,10,2),MID(B3,12,2),MID(B3,14,2))

 

You can try this formula with the user defined format highlighted in the screenshot.

date time.JPG

 

View solution in original post