title: "Cannot convert value to NodaTime.LocalDateTime"
body: <p>I am using .Net Core 3.1 as my framework.</p>
  
  <p>I have this setup on my startup:</p>
  
  <pre><code>using NodaTime;
  using NodaTime.Serialization.SystemTextJson;
  
  services.AddControllers()
          .AddJsonOptions(options =&gt;
          {
              var settings = options.JsonSerializerOptions;
  
              settings.AllowTrailingCommas = false;
              settings.ConfigureForNodaTime(DateTimeZoneProviders.Tzdb);
              settings.WithIsoDateIntervalConverter();
              settings.WithIsoIntervalConverter();
          });
  </code></pre>
  
  <p>And this is my API model:</p>
  
  <pre><code>public class CreateDto
  {
      public int Status { get; set; }
  
      public Guid ApprovedBy { get; set; }
  
      public LocalDateTime DateFrom { get; set; }
  
      public LocalDateTime DateTo { get; set; }
  }
  </code></pre>
  
  <p>This is my Controller:</p>
  
  <pre><code>[HttpPost]
  public async Task&lt;IActionResult&gt; Create([FromBody] CreateDto createEntity)
  {
      var createdEntity = await _service.Create(createEntity);
      return Ok(createdEntity);
  }
  </code></pre>
  
  <p>Everytime I use Postman with this JSON Body:</p>
  
  <pre><code>{
      "Status": 1,
      "ApprovedBy": "970a50c5-ae21-4f41-bea9-691f8c60224c",
      "DateFrom": "2020-04-01T00:00:00.000Z",
      "DateTo": "2020-04-05T23:59:59.000Z"
  }
  </code></pre>
  
  <p>I always gets this error:</p>
  
  <pre><code>{
      "errors": {
          "DateTo": [
              "Cannot convert value to NodaTime.LocalDateTime"
          ],
          "DateFrom": [
              "Cannot convert value to NodaTime.LocalDateTime"
          ]
      },
      "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
      "title": "One or more validation errors occurred.",
      "status": 400,
      "traceId": "|4a836dd3-4ce779bc5503ac63."
  }
  </code></pre>
  
  <p>Question: Am I missing something on my Startup Configuration? If not, what can I do to fix this error?</p>