Use
DateTime.TryParse
[
^] to convert string value into a DateTime.
Then simply take a difference between current date value and this date time value to get the difference.
You can also use the
TimeSpan
class to calculate the difference.
Here[
^] is an example of difference using
TimeSpan.Subtract
.