Office中国论坛/Access中国论坛
标题:
以月对销售金额分组后,作出的图表的月份是英语的,可以做成中文的月份吗?
[打印本页]
作者:
zhycfb2006
时间:
2007-2-9 06:57
标题:
以月对销售金额分组后,作出的图表的月份是英语的,可以做成中文的月份吗?
以月对销售金额分组后,作出的图表的月份是英语的,可以做成中文的月份吗?
还有就是月份为横轴,从左到右是月份从12月到1月的,可以搞成从左到右是1月到12月的排列马?
作者:
一点通
时间:
2007-2-9 17:30
看一下旧贴
http://www.office-cn.net/vvb/dispbbs.asp?BoardID=2&replyID=14710&id=2948&skin=0
作者:
zhycfb2006
时间:
2007-2-10 07:34
下面这一段函数放在什么地方啊!
一点通兄!请指点!
Function Date2Chinese(iDate)
Dim num(10)
Dim iYear
Dim iMonth
Dim iDay
num(0) = "〇"
num(1) = "一"
num(2) = "二"
num(3) = "三"
num(4) = "四"
num(5) = "五"
num(6) = "六"
num(7) = "七"
num(8) = "八"
num(9) = "九"
iYear = Year(iDate)
iMonth = Month(iDate)
iDay = Day(iDate)
Date2Chinese = num(iYear \ 1000) + _
num((iYear \ 100) Mod 10) + num((iYear _
\ 10) Mod 10) + num(iYear Mod _
10) + "年"
If iMonth >= 10 Then
If iMonth = 10 Then
Date2Chinese = Date2Chinese + _
"十" + "月"
Else
Date2Chinese = Date2Chinese + _
"十" + num(iMonth Mod 10) + "月"
End If
Else
Date2Chinese = Date2Chinese + _
num(iMonth Mod 10) + "月"
End If
If iDay >= 10 Then
If iDay = 10 Then
Date2Chinese = Date2Chinese + _
"十" + "日"
ElseIf iDay = 20 Or iDay = 30 Then
Date2Chinese = Date2Chinese + _
num(iDay \ 10) + "十" + "日"
ElseIf iDay > 20 Then
Date2Chinese = Date2Chinese + _
num(iDay \ 10) + "十" + _
num(iDay Mod 10) + "日"
Else
Date2Chinese = Date2Chinese + _
"十" + num(iDay Mod 10) + "日"
End If
Else
Date2Chinese = Date2Chinese + _
num(iDay Mod 10) + "日"
End If
End FunctionFunction Date2Chinese(iDate)
Dim num(10)
Dim iYear
Dim iMonth
Dim iDay
num(0) = "〇"
num(1) = "一"
num(2) = "二"
num(3) = "三"
num(4) = "四"
num(5) = "五"
num(6) = "六"
num(7) = "七"
num(8) = "八"
num(9) = "九"
iYear = Year(iDate)
iMonth = Month(iDate)
iDay = Day(iDate)
Date2Chinese = num(iYear \ 1000) + _
num((iYear \ 100) Mod 10) + num((iYear _
\ 10) Mod 10) + num(iYear Mod _
10) + "年"
If iMonth >= 10 Then
If iMonth = 10 Then
Date2Chinese = Date2Chinese + _
"十" + "月"
Else
Date2Chinese = Date2Chinese + _
"十" + num(iMonth Mod 10) + "月"
End If
Else
Date2Chinese = Date2Chinese + _
num(iMonth Mod 10) + "月"
End If
If iDay >= 10 Then
If iDay = 10 Then
Date2Chinese = Date2Chinese + _
"十" + "日"
ElseIf iDay = 20 Or iDay = 30 Then
Date2Chinese = Date2Chinese + _
num(iDay \ 10) + "十" + "日"
ElseIf iDay > 20 Then
Date2Chinese = Date2Chinese + _
num(iDay \ 10) + "十" + _
num(iDay Mod 10) + "日"
Else
Date2Chinese = Date2Chinese + _
"十" + num(iDay Mod 10) + "日"
End If
Else
Date2Chinese = Date2Chinese + _
num(iDay Mod 10) + "日"
End If
End Function
作者:
一点通
时间:
2007-2-10 07:50
放在模块里,调用
ate2Chinese(日期值)
欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/)
Powered by Discuz! X3.3