title: Subtract/Add days to a predefined date using Write-Host
body: <p>I am trying to display milestones. I tried below but I get an error that displays <code>Method invocation failed because [System.String] does  not contain a method named 'AddDays'.</code> I have predefined <code>$lastmodified</code> in a previous line and it is <code>12/28/2015 0:00</code></p>
  
  <pre><code>$predetermined=[system.datetime]$LastModified
  $date= ($predetermined).AddDays(30).ToString("MM/dd/yyyy:")
  
  $date5 = ($date).AddDays(-15).ToString("MM/dd/yyyy:")
  $date4 = ($date).AddDays(-12).ToString("MM/dd/yyyy:")
  $date3 = ($date).AddDays(-9).ToString("MM/dd/yyyy:")
  $date2 = ($date).AddDays(-6).ToString("MM/dd/yyyy:")
  $date1 = ($date).AddDays(-3).ToString("MM/dd/yyyy:")
  
  write-host -foregroundcolor Green "$date5 Action 1"
  write-host -foregroundcolor Green "$date4 Action 2"
  write-host -foregroundcolor Green "$date3 Action 3"
  write-host -foregroundcolor Green "$date2 Action 4"
  write-host -foregroundcolor Green "$date1 Action 5"
  write-host -foregroundcolor Green "$date Action 6"
  </code></pre>
  
  <p>My output should say </p>
  
  <pre><code>12/23/2015: Action 1"
  12/26/2015: Action 2"
  12/19/2015: Action 3"
  12/22/2015: Action 4"
  12/25/2015: Action 5"
  12/28/2015: Action 6"
  </code></pre>