I have data in cell A2 of a CSV file (no headers) that looks like this: RPT DATE :07/20/23
How can I use PowerShell to read this cell from the file, strip out all except the date value and reformat it to look like: YY-MM-DD
I don't need to read any other data out of the file and there are no headers but there is other data in the first row of the file. I'm not able to modify the source CSV.
I've played with variations of the examples here with no luck: get specific cell value in csv file using powershell
This returns "WARNING: One or more headers were not specified. Default names starting with "H" have been used in place of any missing headers." but no actual value.