c# - How to find the difference between two dates -
how can find difference between 2 dates. example, difference between birthdate , current date. both dates in text boxes.
i'll assume text box named birthdatetextbox exists , contains birth date:
datetime birthdate = datetime.parse(birthdatetextbox.text); timespan timebetweendates = datetime.now.subtract(birthdate);
there overloads of datetime.parse, datetime.tryparse, should read in documentation.
Comments
Post a Comment