日期时间选择器的日期 VB.NET 值
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19132374/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
DateTimePicker Value of Day VB.NET
提问by Miyu Kounji
I have DateTimepicker1 and DateTimePicker2 . I need to get the specific value of day from DT1 to DT2.
我有 DateTimepicker1 和 DateTimePicker2 。我需要从 DT1 到 DT2 获取日期的具体值。
ex. DT1 = Sept 27, 2013 and DT2 = Sept Oct 2, 2013
ex. DT1 = Sept 27, 2013 and DT2 = Sept Oct 2, 2013
i want to get the value 27,28,29,30,1,2 to integer
我想将值 27,28,29,30,1,2 转换为整数
this is my code but only works in day 1 to 30.
这是我的代码,但仅适用于第 1 天到第 30 天。
For mcount = DateTimePicker1.Value.Day To DateTimePicker2.Value.Day
' value = mcount
Next
Can anyone help me in this?.. thanks
任何人都可以帮助我吗?..谢谢
采纳答案by Rob Sedgwick
How about:
怎么样:
For mcount = DateTimePicker1.Value To DateTimePicker2.Value
value = mcount.Day
Next

