title: Get the last day of month
body: <p>I want to get the last day of the month.</p>
  <p>This is my code. If I want to debug it and compile it to the database it says it has an error in the syntax.</p>
  <pre class="lang-vb prettyprint-override"><code>Public Function GetNowLast() As Date
      Dim asdfh As Date
      asdfh = DateValue(&quot;1.&quot; _
        &amp; IIf(Month(Date) + 1) &gt; 12, Month(Date) + 1 - 12, Month(Date) + 1) _
        &amp;&quot;.&quot;&amp;IIf(Month(Date)+1)&gt;12 , Year(Date)+1,Year(Date))
      asdf = DateAdd(&quot;d&quot;, -1, asdf)
      GetNowLast = asdf
  End Function
  </code></pre>