title: convert date time to Epoch format in CSV in powershell
body: <p>I want to convert datetime to Epoch format in csv file using PowerShell. In the csv file I have only time data, and I want to use current date and time specified in csv to convert it to Epoch format .</p>
  
  <p><strong>in.csv</strong></p>
  
  <pre><code>"192.168.1.2","01-any1TEST ","Ping","Down at least 3 min","17:25:14",":Windows 2012 Server"
  "192.168.1.2","02-any2TEST  ","Ping","Down at least 4 min","17:25:40",":Unix Server"
  "192.168.1.2","03-any3TEST ","Ping","Down at least 3 min","17:26:21",":windows host " 
  </code></pre>
  
  <p><strong>My findings</strong></p>
  
  <p>This should be doable using a combination of the below two. The main issue I am facing is that I am unable to combine the current date with the time in csv file.</p>
  
  <pre><code>Import-Csv ".\out.csv" |
  ForEach-Object {
      $_.Date = [datetime]::Parse($_.Date).ToString('MM/dd/yyyy HH:mm')
  }
  
  Get-Date -Date "12/31/2015 23:59:59" -UFormat %s
  </code></pre>