Wednesday 14 January 2015

How to calculate difference between two dates in C#

Assuming StartDate and EndDate are of type DateTime:
int dateDifference = (StartDate - EndDate).Days;

0 comments:

Post a Comment


                                                            
 
Design by Abhinav Ranjan Sinha