title: Sending date from json ajax to webapi shows value 1/1/0001
body: <p>I have a jquery post ajax call where I pass a model in which there are properties defined including a datetime field.</p>
  
  <p>This datetime field is passed using moment.js. In jquery when I check the value it comes out fine. But when I check the same value in my WebApi call, that same date field shows value as 1/1/0001.</p>
  
  <p>Following is my jquery code:</p>
  
  <pre><code>var model = {
      "ID": 0,
      "DocNumber": $('#txtDocNo').val(),
      "DocDate": moment($('#txtDocDate').val()).format('DD-MM-YYYY'),
      "Amount": $('#txtAmt').val(),
      "Items": arrErrorData
  };
  function PostSync(targetUrl, model) {
  var result = null;
  $.ajax({
      url: targetUrl,
      data: JSON.stringify(model),
      dataType: 'json',
      type: 'POST',
      contentType: 'application/json',
      async: true,
      success: function (data) {
          if (data !== undefined) {
              result = data;
          }
      },
      error: function (data) {
          result = data.statusText;
      }       
  });
  
  return result;
  </code></pre>
  
  <p>}</p>
  
  <p>When I check my date here in the model, it shows the correct format and value. But when I check in my WebApi method it shows 1/1/0001.</p>
  
  <p>Following is my WebApi method:</p>
  
  <pre><code>public void Post([FromBody]InvoiceDetails InvoiceDetails)
      {
          _itemsbs.Add(InvoiceDetails);
      }
  </code></pre>
  
  <p>Any ideas or suggestions of how I can rectify it, would be great.</p>
  
  <p>Thanks In Advance!!!..</p>