I have a string that coming in date format date=08/21/2016 what I want to do is find the numbers of days From today's date in C# I have converted the string like this.
DateTime Date = Convert.ToDayTime("08/21/2016");
DateTime TodayDate = DateTime.Today.Day;
DateTime SubDate = Date.Subtract(TodayDate);
On the third line, I'm getting error cannot convert System.TimeSpan to System.DateTime
Is there an another way to do this what I want to do I just calculate numbers of days from a future date that is coming as a string
Example
TodayDate=08/01/2016
FutureDate=08/20/2016
Answer 19 days
I'm new to C# if it's not to much trouble could somebody share code solution how to achieve this? Thanks for the help