while i am trying to fetch datetime data from db it shows the error String was not recognized as a valid DateTime.
code:
Model:
public DateTime? ReviewedDate{get;set;}
Controller:
DateTime? ReviewedDate = null;
if (testordervm.ReviewedDate != DateTime.MinValue)
{
ReviewedDate = DateTime.Parse(dsobj.Tables[0].Rows[0]["ReviewedDate"].ToString());
}
else
{
ReviewedDate = null;
}