6
Reply

Compare date only and find the difference

Ask a question
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)