VB-取日期属于星期几

2018-01-23 10:37:57 浏览数 (1)

        有时会比较常用了,很简单但我记不住。

调用: "星期" & ToCN(Weekday(date, vbMonday))

代码语言:js复制
Function ToCN(i As Integer) As String
   Select Case i
     Case 1
       ToCN = "一"
     Case 2
       ToCN = "二"
     Case 3
       ToCN = "三"
     Case 4
       ToCN = "四"
     Case 5
       ToCN = "五"
     Case 6
       ToCN = "六"
     Case 7
       ToCN = "天"
   End Select
 End Function

0 人点赞