title: How to Convert C# Variable DateTime Into SqlDbType.DateTime
body: <p>How to convert a C# DateTime variable into Enum of SqlDataType.DateTime?</p>
  
  <p>How to consume that enum into a connection string?</p>
  
  <p>Is doing something like this correct?</p>
  
  <pre><code>string str = "SELECT * FROM TABLE WHERE CreateDt " + &lt;that enum&gt;;
  SqlConnection Connection = new SqlConnection (&lt;connection setting&gt;);
  Table = new DataTable();
  SqlDataAdapter adapter = new SqlDataAdapter(str, Connection);
  adapter.FillSchema(Table, SchemaType.Source);
  adapter.Fill(Table);
  </code></pre>
  
  <p>Thank you</p>