Select Categories Below
Status: Closed Points: 75 Time: 04:57 - Sep 26, 2007
dustPuppy
i need to calculate the day difference between two dates that can be more than a year apart. I can't seem to figure the right way of doing this in C#. I mean I can subtract one date from the other, but how do I get the remaining out as number of days?
Categories:
Add Categories
When adding more than one category, separate them with commas.
Advertisement
Date:: Sep 28, 2007
Time:: 12:59
I found out it was more simple than I thought. subtracting one date from another returns not a datetime as I thought I saw, but a TimeSpan object. So you can do this: TimeSpan difference = endTime.Subtract(startTime); and then get the days with: difference.Days
Question Answered
This question has been closed, and points have been rewarded to the following experts:
You're welcome however to comment or give additional information or if you wish, you have the ability to write a Tutorial in the Tutorial Area.
Answer this Question
New User
Email:
Upon submission of this form, you will automatically be registered as a Quomon user and we will send your login information to this address
Registered User
Username:
Password:
Forgot Your Password?
Enter your email address below and we will resend your login information to you.
Login Information Sent
Questions
how do i open a file dialog in .net (a windows application)?
When trying to alter a table in MySQL, I get "Error on rename... (Errcode: 13)"
how do i delete a top domain cookie from a subdomain?
Hi Am Rakesh, Am generating User Data List, Details Given Below.Please Help Me.
What is some free software for recording the movements on your computer screen t...
Good project management software?
You have 100 characters to use
Rank
Expert
Points
1.
6432
2.
4221
3.
3650
4.
2807
5.
2698
6.
1953
7.
1820
8.
1000
9.
812
10.
695
Register today to share your knowledge with the community and be recognized and rewarded for your contributions.
Register Here
"Psst, Quomon is a great site. Pass it on." Tell a Friend | Link To Us | Save to Delicious | Digg it
Language Options
English:
Español:
Sponsors
Questions and Answers Software Real Estate Postcards Marketing Fulfillment