我想知道是否有一种方法可以直接将整数DayOfWeek
返回转换为表示星期一、星期二等日期的字符串。
示例代码:
MessageBox.Show(Date.Today.DayOfWeek)
这将返回6
(截至今天)。例如,有没有办法直接将其转换Saturday
为 ?我真的不在乎它将它真正转换成什么,但我想取消我的 Select Case:
Select Case Date.Today.DayOfWeek
Case 0
day = "Sunday"
Case 1
day = "Monday"
Case 2
day = "Tuesday"
Case 3
day = "Wednesday"
Case 4
day = "Thursday"
Case 5
day = "Friday"
Case 6
day = "Saturday"
Case Else
day = "Apocalypse: we're all boned."
End Select
谢谢 :)