Unable to cast object on getting remaining days – Asp.net
I am trying to get the remaining date to two decimal points code I tried (Math.Round((Convert.ToDecimal(DateTime.Now - i.dueDate)),2)).ToString() Error I am getting Unable to cast object of type 'System.TimeSpan' to type 'System.IConvertible'. How can i solve this ?