title: Weird DateTime Format Issue With .NET SqlCommand.AddWithValue()
body: <p>I'm using a parameterized query to read a table:</p>
  <pre><code>DateTime date = DateTime.Now.Date;
  SqlCommand cmd = new SqlCommand(&quot;select top 10 * from Mails  where Date&gt;=@today and Date&lt;@tomorrow&quot;);
  cmd.Parameters.AddWithValue(&quot;@today&quot;, date);
  cmd.Parameters.AddWithValue(&quot;@tomorrow&quot;, date.AddDays(1));
  </code></pre>
  <p>This query was working as expected till the first days of this year. When I checked with SQL Server profiler the query is converted to this format YYYY-MM-DD:</p>
  <pre><code>select top 10 * from Mails  where Date&gt;='2021-01-05 00:00:00' and Date&lt;'2021-01-06 00:00:00'
  </code></pre>
  <p>However, SQL Server seems to expect YYYY-DD-MM for the correct result. This query works as expected:</p>
  <pre><code>select top 10 * from Mails  where Date&gt;='2021-05-01 00:00:00' and Date&lt;'2021-06-01 00:00:00'
  </code></pre>
  <p>The column data type is <code>DateTime</code>. As far as I know .NET converts the <code>DateTime</code> to the correct SQL format when passed as a parameter. And I haven't experienced such an issue before.</p>
  <p>What am I missing?</p>
  <p>EDIT 1:</p>
  <p>Here is the exact profiler result:</p>
  <pre><code>exec sp_executesql N'select top 10 * from Mails where Date&gt;=@today and Date&lt;@tomorrow',N'@today datetime,@tomorrow datetime',@today='2021-01-05 00:00:00',@tomorrow='2021-01-06 00:00:00'
  </code></pre>
  <p>SQL Server returns us_english to select @@language but the server language and client is tr_turkish.
  The format of column is datetime, no issues here. As I said it used to work fine before.</p>