I need your help
I have output from csv file which look like below, and I need to convert dates into Unix timestamp. Header "Scheduled Start Date Time" can be removed by simple replace command in order to keep only dates, however each row need to be changed into UNIX timestamp.
Scheduled Start Date Time
2020-04-14 19:00
2020-04-15 06:00
2020-04-15 06:00
2020-04-15 14:00
2020-04-15 14:00
2020-04-15 09:00
2020-04-15 14:00
2020-04-15 09:00
I tried something like that, but it is not working:
$trimfile = Get-Content -Path "C:\Users\timestamp.txt"
Get-Date -Date $trimfile -UFormat %s | Out-File "C:\Users\timestamp1.txt"