Currently the datetime constraint accepts datetime in the format "mm-dd-yyyy" (btw, hyphen is not mandatory, can have '.' too as a separator), it would be useful if we provide a way for user to specify what kind of format do they expect...ex: dd-mm-yyyy or yyyy-mm-dd etc.
```
[HttpGet("getdata/{dt:datetime}")]
public string GetData(DateTime dt)
{
return "GetData:" + dt.ToString();
}
```
Yeah, a user could always write a custom date time constraint easily to achieve this, but that makes our default constraint not much useful in the end.
```
[HttpGet("getdata/{dt:datetime}")]
public string GetData(DateTime dt)
{
return "GetData:" + dt.ToString();
}
```
Yeah, a user could always write a custom date time constraint easily to achieve this, but that makes our default constraint not much useful in the end.