title: PowerShell: extract timestamp from string
body: <p>I am brand new to PowerShell and have figured out how to extract a relevant line from a log file:</p>
  
  <pre><code>C:\Documents and Settings\admin\Local Settings\Application Data\Microsoft\SyncToy\2.0\SyncToyLog.log:325:SYNC: 05/22/2012 14:54:55:857: SyncToy run of Profile Backup (C:\Documents and Settings\admin\, H:\Sync\) completed at 5:22/2012 2:54:55 PM.
  </code></pre>
  
  <p>What I would like to do is extract the first timestamp sans milliseconds (the one that uses 24 hour time) to a variable. Result:</p>
  
  <pre><code>05/22/2012 14:54:55
  </code></pre>
  
  <p>Any assistance would be appreciated.</p>