Insert characters into string in different locations

user3882752 picture user3882752 · Feb 20, 2015 · Viewed 27.5k times · Source

I have a string which looks like this 20141007023617. And I would like to make it look like this 2014-10-07T02:36:17Z. The T and Z are very important for me. So I would like to insert them as well.

So a recap,

A1 holds this string 20141007023617

B1 should hold this string 2014-10-07T02:36:17Z

Answer

BrakNicku picture BrakNicku · Feb 20, 2015

Solution with TEXT function:

=TEXT(A1,"0000-00-00\T00\:00\:00\Z")