Public Function CCDate$(ByVal MyDate As Date)
y = CStr(Year(MyDate)): m = Month(MyDate): d = Day(MyDate)
For i = 1 To 4
CCDate = CCDate & Mid("Ο一二三四五六七八九", Val(Mid(y, i, 1)) + 1, 1)
Next
CCDate = CCDate & "年"
CCDate = CCDate & Trim(Mid("一 二 三 四 五 六 七 八 九 十 十一十二", m * 2 - 1, 2)) & "月"
CCDate = CCDate & Trim(Mid(" 十二十三十", (d \ 10) * 2 + 1, 2)) & Trim(Mid(" 一二三四五六七八九", (d Mod 10) + 1, 1)) & "日"
End Function
'请注意 字符串中 看不到的空格 别少了
Private Function CCDate$(d As Date)
CCDate = fun(Year(d)) & "年" & fun(Month(d)) & "月" & fun(Day(d)) & "日"
CCDate = Replace(CCDate, "〇日", "十日")
End Function
Private Function fun$(n As Integer)
For i = 1 To Len(CStr(n))
fun = fun + Choose(Val(Mid(CStr(n), i, 1)) + 1, "〇", "一", "二", "三", "四", "五", "六", "七", "八", "九")
Next
End Function
Public Function CCDate$(ByVal MyDate As Date)
y = CStr(Year(MyDate)): m = Month(MyDate): d = Day(MyDate)
For i = 1 To 4
CCDate = CCDate & Mid("Ο一二三四五六七八九", Val(Mid(y, i, 1)) + 1, 1)
Next
CCDate = CCDate & "年"
CCDate = CCDate & Trim(Mid("一 二 三 四 五 六 七 八 九 十 十一十二", m * 2 - 1, 2)) & "月"
CCDate = CCDate & Trim(Mid(" 十二十三十", (d \ 10) * 2 + 1, 2)) & Trim(Mid(" 一二三四五六七八九", (d Mod 10) + 1, 1)) & "日"
End Function