I have a bunch of folders with thousands of files from which i generate a .csv file containing the filenames only. These filenames contain a timestamp in the following format: 20180523040545689
.
I want to convert these timestamps on the .csv file to a UTC format as follows: 2018-05-23 T 04:05:45.689 TZ +01:00
Here is the current .csv format i have:
20180523040545689, 458796ZUx, WE25, 79peo
Here's the output i want to obtain:
2018-05-23 T 04:05:45.689 TZ +01:00, 458796ZUx, WE25, 79peo
Is there a way to accomplish that in a quick and simple way using a Powershell script?
UPDATE:
I have been testing the script provided by @vonPryz and it gives me the following error:
Exception calling "ParseExact" with "3" argument(s): "String was not recognized as a valid DateTime."
I am pretty sure that it is a problem with cells formatting but i couldn't resolve it yet.