title: SQL Server nvarchar to date
body: <p>I'm trying to write a query and convert a <code>nvarchar</code> to a <code>date</code>. I've tried the below but keep receiving an error:</p>
  <blockquote>
  <p>Conversion failed when converting date and/or time from character string.</p>
  </blockquote>
  <pre class="lang-sql prettyprint-override"><code>cast(columnName as DATE) as castDate
  convert(Date, columnName, 23) as convertDate
  </code></pre>
  <pre class="lang-none prettyprint-override"><code>(nvarchar(max),null)
  2021-12-30 02:22:24 UTC
  </code></pre>
  <p>Desired output:</p>
  <pre class="lang-none prettyprint-override"><code>2021-12-30
  </code></pre>