All the dates in my URLs come in this format: dd-MM-yyyy. Example: 31-12-2017
Currently, my Web API has a method like this
[HttpGet]
public Task<IAsyncResult> GetSomething([FromQuery] date)
{
...
}
The problem is that my Web API seems work ONLY with dates formatted in US English.
- A date like 12-31-2017 will work.
- Whereas a date like 31-12-2017 won't work.
How can I make it bind my custom data format from the query to the injected parameter?