title: Inserting a date into a database does not work (ASPX/C#)
body: <p>I have this C# code:</p>
  
  <pre><code>string RegisterDate = DateTime.Now.ToString();
  RegisterDate = RegisterDate.Remove(10);
  RegisterDate = RegisterDate.Replace('/', '-');
  RegisterDate = String.Join("-", RegisterDate.Split('-').Reverse());
  </code></pre>
  
  <p>Which gives thie result: <strong>01-06-2013</strong></p>
  
  <p>The problem is that when I try to insert it to the table I get this result: <strong>21/06/1894</strong></p>
  
  <p>When I get the date via input it works great in the same date format, so why in this case it doesn't work?</p>
  
  <p><strong>update</strong> </p>
  
  <p>If I try this:</p>
  
  <pre><code>    var RegisterDate = DateTime.Today.Date;
  </code></pre>
  
  <p>I get Error :</p>
  
  <blockquote>
    <p>Syntax error (missing operator) in query expression</p>
  </blockquote>
  
  <p>Wish for help, thanks!</p>