C# Developer Blog
Monday, February 15, 2010
Getting months between two dates
DateTime dt1 = DateTime.Parse("15-04-2010");
DateTime dt2 = DateTime.Parse("15-09-2007") ;
int months = dt1.Month - dt2.Month;
int years = dt1.Year - dt2.Year;
months += years * 12;
1 comment:
Anonymous
April 24, 2014 at 8:23 PM
working with month views
Reply
Delete
Replies
Reply
Add comment
Load more...
Older Post
Home
Subscribe to:
Post Comments (Atom)
working with month views
ReplyDelete