I need to have an action parameter that has a datetime value? Is there a standard way to do this? I need to have something like:
mysite/Controller/Action/2
I have the same problem. I use DateTime.Parse Method. and in the URL use this format to pass my DateTime parameter 2018-08-18T07:22:16
for more information about using DateTime Parse method refer to this link : DateTime Parse Method
string StringDateToDateTime(string date)
{
DateTime dateFormat = DateTime.Parse(date);
return dateFormat ;
}
I hope this link helps you.