ayi_2 <pre><code class="lang-auto">SELECT DATEADD(month, DATEDIFF(month, 0, @mydate), 0) AS StartOfMonth </code></pre>