title: How to pass DateTime value in url into ASP.Net Core MVC Controller from Postman
body: <p>I am trying to test an endpoint that takes two DateTimes as parameters by sending in requests via Postman. Here is the Controller method:</p>
  
  <pre><code>[HttpGet("metrics/user/{ownerId}/{startDate}/{endDate}")]
  public async Task&lt;IActionResult&gt; GetUserCompletionRate(int ownerId, DateTime startDate, DateTime endDate)
  {
      //Check if user exists
      var userExists = await unitOfWork.userAccountRepository
              .UserAccountExists(ownerId);
      //User doesn't exist
      if (!userExists) return NotFound("Couldn't find user.");
      //User exists
      Double completionRate = await unitOfWork.completionLogEntryRepository.GetUserCompletionRate(ownerId, startDate, endDate);
      return Ok(completionRate);
  }
  </code></pre>
  
  <p>I've tried sending them in like this:</p>
  
  <p><code>http://.../api/metrics/user/2/2018-7-23T00:00:00/2018-7-24T10:24:00</code></p>
  
  <p>I then tried removing the parameters from the route and send it in like this:
  <code>http://.../api/metrics/user?ownerId=2&amp;startDate=2018-7-23T00:00:00&amp;endDate=2018-7-24T10:24:00</code></p>
  
  <p>but nothing is working. I also tried declaring the dates in the route as <code>{startDate:datetime}</code> and nothing. How do I send in a DateTime object from Postman. I keep getting 404 Not Found errors.</p>