Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Month count between two dates
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01084837
Message ID:
01084854
Views:
13
>Hi,
>
>
>In C#, how can I get the month count between two dates.
>
>Something like this
>
>iMonthCount = dDate1 - Date2 // Result in months
>
DateTime objects in .NET have a Month property that you can use for this.
Something like this should help you get started:
int iMonthCount = dDate1.Month - dDate2.Month;
Einar
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform