title: MVC EF - datetime format
body: <p>This is my class:</p>
  
  <pre><code> public partial class Post
  {
      public Post()
      {
          this.PostImages = new HashSet&lt;PostImage&gt;();
          this.PostMappings = new HashSet&lt;PostMapping&gt;();
      }
  
      public int ID { get; set; }
      public string Title { get; set; }
      public string TitleMenu { get; set; }
      public string Preview { get; set; }
      public string Content { get; set; }
      public Nullable&lt;int&gt; Display { get; set; }
      [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
      public Nullable&lt;System.DateTime&gt; DateAdded { get; set; }
      [DisplayFormat(DataFormatString = "{0:dd/MM/yyyy}", ApplyFormatInEditMode = true)]
      public Nullable&lt;System.DateTime&gt; DateHide { get; set; }
      public Nullable&lt;int&gt; PozitionMenu { get; set; }
      public string Username { get; set; }
  
      public virtual ICollection&lt;PostImage&gt; PostImages { get; set; }
      public virtual ICollection&lt;PostMapping&gt; PostMappings { get; set; }
  }
  </code></pre>
  
  <p>I want to update the column <em>DateHide</em>.</p>
  
  <pre><code>   @Html.TextBoxFor(model =&gt; model.DateHide, new { @class = "jquery_datepicker", @Value = (!Model.DateHide.HasValue ? "" : Model.DateHide.Value.ToString("dd/MM/yyyy"))})
  
       $('.jquery_datepicker').datepicker({ dateFormat: "dd/mm/yy" });
  </code></pre>
  
  <p>I added in web.config:</p>
  
  <pre><code>&lt;globalization culture="en-US" /&gt;
  </code></pre>
  
  <p>And I still get the error:</p>
  
  <p><em>The value '20/02/2014' is not valid for DateHide.</em></p>