[求助]关于VB.net 下输出星期几的问题
本人新近学习VB.net,用的是VS2005的编译环境,今天在在学习时遇到一点问题,在此请教:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim thisDate As Date
thisDate = Today
Dim time As Date
time = TimeOfDay
Dim i As Date
Dim j As Date
Dim q As Integer
i = #12:00:00 AM#
j = #12:00:00 PM#
q = Weekday(thisDate)
If time > i And time < j Then
TextBox2.Text = "上午" & CStr(q)
Else
TextBox2.Text = "下午" & CStr(q)
End If
TextBox1.Text = CStr(thisDate) & " " & CStr(time)
End Sub
这是代码,q = Weekday(thisDate)不是根据当前日期返回星期几的吗?为什么我这显示的不对呢?
今天是10月22日星期一吧
为什么上面显示的是星期二?