Forum Discussion
excelnewbie99
Jan 08, 2023Copper Contributor
Transform text string into date-time
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
- Jan 08, 2023
=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.
OliverScheurich
Jan 08, 2023Gold Contributor
=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.
- excelnewbie99Jan 09, 2023Copper Contributor