For example:
DateTime date1 = new DateTime(1955, 12, 12);
DateTime date2 = new DateTime(1967, 3, 6);
TimeSpan fff = date2 - date1;
Will it calculate number of days correctly? (taking leap year into account)
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, it takes this into account.
For proof, try:
The above outputs: -366 / -365