计算使用radMonthYearPicker月份不同 [英] Calculate month different using radMonthYearPicker
问题描述
我有2 radMonthYearPicker(1是起始日期另1是结束日期)
我要计算这个2日期间不同的月份。
我的开始日期,我在我的月设定为DEC和2012年。
我的结束日期,我在我的月设定为DEC和2013年
在此基础上2 RadMonthYearPicker,当月除了应为12个月
只有code我可以找出是RadMonthYearPicker.selectedDate
P.S。我是不允许上传的图像文件,由于缺乏repulation点
INT monthsApart = 12 *(startDate.Year - endDate.Year)+
startDate.Month - endDate.Month;INT结果= Math.Abs(monthsApart);
I have 2 radMonthYearPicker(1 is for start Date another 1 is for end Date) I want to calculate the month different between this 2 date.
for my start Date, I set my month as dec and year 2012. for my end Date, I set my month as dec and year 2013
Base on this 2 RadMonthYearPicker, the month apart should be 12 month
The only code I can find out is RadMonthYearPicker.selectedDate
P.S. I was not allow to upload image file due to lack of repulation point
int monthsApart = 12 * (startDate.Year - endDate.Year) +
startDate.Month - endDate.Month;
int result = Math.Abs(monthsApart);
这篇关于计算使用radMonthYearPicker月份不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!