title: Get First And Last Day Of Year
body: <p>In VBA I know you can use this syntax to subtract a year from a date</p>
  
  <pre><code>Dim testdate As String, DateTest As String
  testdate= "03/21/2017"
  DateTest = Month(testdate) &amp; "/" &amp; Day(testdate) &amp; "/" &amp; Year(testdate) - 1
  </code></pre>
  
  <p>But how could you find the first and last date of a given year?  For example, let's use the same date</p>
  
  <pre><code>testdate = "03/21/2017"
  </code></pre>
  
  <p>and get the following values</p>
  
  <pre><code>firstdate = "01/01/2017"
  lastdate = "12/31/2017"
  </code></pre>