I am using net core 3.1 in my web API project. I have created one API which accepts the date from the user. By default **MM-dd-yyyy** format is accepted in the project. But I want to accept the date in **dd-MM-yyyy** format and validate all dates accordingly.

Below is my api :

```
    [HttpGet]
    public async Task<IActionResult> Get(DateTime fromDate, DateTime toDate)
    {
        return Ok();
    }

```

Also, I have APIs in which the date parameter is passed in the request body as JSON.
I have tried following StackOverflow answers but nothing worked:

<https://stackoverflow.com/a/58103218/11742476>

The above solution worked when passing the date inside the request body but not when passing the date in the URL.

Is there any other way through which I can achieve this. ?