title: Today and Yesterday's date at midnight in specific format
body: <p>I need to get today and yesterdays date at midnight in the following format:</p>
  
  <p><code>08/05/2018 00:00</code></p>
  
  <p>The best I seem to be able to get is this:</p>
  
  <pre><code>get-date -Uformat "%D %R" -Hour 0 -Minute 00
  </code></pre>
  
  <p><code>08/05/18 00:00</code></p>
  
  <p>I fail miserably when trying to get yesterday at midnight.</p>
  
  <pre><code>(Get-Date -UFormat "%s" -Hour 0 -Minute 00 -Second 00).AddDays(-1)
  </code></pre>
  
  <blockquote>
    <p>Method invocation failed because [System.String] does not contain a method named AddDays.
    At line:1 char:1
    + (Get-Date -UFormat "%s" -Hour 0 -Minute 00 -Second 00).AddDays(-1)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
        + FullyQualifiedErrorId : MethodNotFound</p>
  </blockquote>