我有DateTimepicker1和DateTimePicker2。我需要从DT1到DT2获取当天的具体值。
ex. DT1 = Sept 27, 2013 and DT2 = Sept Oct 2, 2013
我希望将值27,28,29,30,1,2变为整数
这是我的代码,但仅适用于第1天至第30天。
For mcount = DateTimePicker1.Value.Day To DateTimePicker2.Value.Day
' value = mcount
Next
有人可以帮我吗?谢谢
答案 0 :(得分:1)
怎么样:
For mcount = DateTimePicker1.Value To DateTimePicker2.Value
value = mcount.Day
Next