Get error when I try to pass date value in URL to web api method
<p>I create this date variable in client side:</p>

<pre><code> this.latestDate = new Date(2001, 1, 1,1,1,1,1);
</code></pre>

<p>Here how it looks in client watch:</p>

<pre><code>self.latestDate: Thu Feb 01 2001 01:01:01 GMT+0200 (Jerusalem Standard Time)
</code></pre>

<p>here is angularjs service that I use to asyncroniusly call my web api method:</p>

<pre><code>$http.get(serviceUrl + "?date=" + self.latestDate);
</code></pre>

<p>And here is the web api method that I call from cilent:</p>

<pre><code>    [HttpGet]
    public HttpResponseMessage GetByDate(DateTime date){}
</code></pre>

<p>But each time I call for web api method above, I get this error on cilent:</p>

<pre><code>&lt;Error&gt;
&lt;Message&gt;The request is invalid.&lt;/Message&gt;
&lt;MessageDetail&gt;
The parameters dictionary contains a null entry for parameter 'date' of non-nullable type 'System.DateTime' for method 'System.Net.Http.HttpResponseMessage GetByDate(System.DateTime)' in 'SensorObservation.Web.SensorsDataController'. An optional parameter must be a reference type, a nullable type, or be declared as an optional parameter.
&lt;/MessageDetail&gt;
&lt;/Error&gt;
</code></pre>

<p>Any idea why I get the error above?</p>