title: Formatting TSQL date to mm-dd-yyyy
body: <p>I have a date in Datetime2 format and it is coming up as yyyy-mm-dd. Is there a way to reformat it so it is mm-dd-yyyy? </p>
  
  <pre><code>                CASE 
                  WHEN CAST(ai.[Due Date] AS DATETIME2)  &lt; GETDATE() THEN '[due]' + LEFT((ai.[Due Date]),10)
                  WHEN CAST(ai.[Due Date] AS DATETIME2) IS NULL THEN ' '
                  ELSE LEFT((ai.[Due Date]),10)
              END AS [TD]
  </code></pre>