|
Function FD(DT As Date)
Dim dtStr As String
Dim dfStr
Dim YR, MT, DY
dtStr = Year(DT)
mtStr = "零一二三四五六七八九"
For i = 1 To Len(dtStr)
dfStr = dfStr & Mid(mtStr, Mid(dtStr, i, 1) + 1, 1)
Next i
MT = IIf(Len(Month(DT)) = 1, "0" & Month(DT), Month(DT))
If Left(MT, 1) = 0 Then
dfStr = dfStr & "年零" & Mid(mtStr, Mid(MT, 2, 1) + 1, 1)
Else
dfStr = dfStr & "年" & Mid(mtStr, Mid(MT, 1, 1) + 1, 1) & "十" & IIf(Mid(MT, 2, 1) = 0, "", Mid(mtStr, Mid(MT, 2, 1) + 1, 1))
End If
DY = IIf(Len(Day(DT)) = 1, "0" & Day(DT), Day(DT))
If Left(DY, 1) = 0 Then
dfStr = dfStr & "月零" & Mid(mtStr, Mid(DY, 2, 1) + 1, 1)
Else
dfStr = dfStr & "月" & Mid(mtStr, Mid(DY, 1, 1) + 1, 1) & "十" & IIf(Mid(DY, 2, 1) = 0, "", Mid(mtStr, Mid(DY, 2, 1) + 1, 1))
End If
FD = dfStr & "日"
End Function
|
|