Hello
I am trying to import csv from user process data I generated.
One of the fields is called CreationDate & contains a time and date format like this 31/03/2015 15:53:52, I want to convert it to just a date format dd/mm/yyyy.
This is what I have so far but I struggling getting the CreationDate converted to dd/mm/yyyy
$data = Import-Csv -Path $csv | ForEach-Object {$_.CreationDate = get-date -Format 'dd/MM/yyyy'}
This gets me the dates but is missing the rest of the fields
$data = Import-Csv -Path $csv | ForEach-Object {[datetime]::Parse($_.CreationDate).ToString('MM/dd/yyyy')}
Thank you in adavnce
Steve
- Edited by Steve_99 21 hours 51 minutes ago