Created
April 22, 2014 07:03
-
-
Save sergeevyi/11168010 to your computer and use it in GitHub Desktop.
.Net
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get the number of days between a start date and end date | |
| public string DateDifference(DateTime StartDate, DateTime EndDate) | |
| { | |
| TimeSpan t = EndDate.Subtract(StartDate); | |
| string[] list = t.Days.ToString().Split('.'); | |
| return list[0]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment