I'm trying to convert a date through Powershell import-csv and need some help please! I've simplified the content of the csv file to give an example which appears as:
"ServerName","InstallDate"
"SRV1","20220506"
Then I use Powershell command:
Import-Csv 'c:\results\data.csv' | select servername, installdate
The import date is currently in the form of year/month/date and I need it converting to month/date/year eg 05062022 based on sample data above.
I've experimented with [datetime]::ParseExtact but am getting nowhere with it, can anyone help with this? Thanks