title: comparing system date to a log date and display only log entries after system date - pshell
body: <p>I have log file with a date format <code>yyyy-MM-dd HH:mm:ss,FFF</code> for example:</p>
  
  <pre><code>2018-11-20 15:45:58,011 [No|SeSt] [1] [Session#-1,Username=1] INFO  is running
  2018-11-20 15:45:58,021 [No|SeSt] [2] [Session#-2,Username=2] INFO  is running
  2018-11-20 15:45:58,031 [No|SeSt] [3] [Session#-3,Username=3] INFO  is running
  </code></pre>
  
  <p>I need to compare this to the system date and display only logs which are greater than a set system date</p>
  
  <p>I have a <code>$logDate</code> already in <code>yyyy-MM-dd HH:mm:ss,FFF</code> format but the <code>$_.[datetime]</code> is actually a system date with todays date and 00:00:00,000</p>
  
  <pre><code>get-content -Path $file -Tail 100 |  where-object {  $_.[datetime] $_.split()[0] -le $logDate}
  </code></pre>
  
  <p>I probably need to extract the date from the log file 1st?</p>
  
  <p>Thanks</p>