6
Answers

Compare date only and find the difference

Vignesh Kumar

Vignesh Kumar

8y
268
1
Hi,
 
I have a string and say for ex: 30-10-2016 in a string. Now how can I compare this date with today's date only and find the difference.
 
I am unable to use TimeSpan too because I 'm unable to get date only using datetime.  
 
Todays date would be 27-10-2016 
 
I need to find the difference between these two dates 30-10-2016 - 27-10-2016. 
Answers (6)