读书人

如何把数字格式化为0001之类的样子呢

发布时间: 2012-03-23 12:06:21 作者: rapoo

怎么把数字格式化为0001之类的样子呢?
1 0001
2 0002
3 0003
4 0004
……

10 0010
11 0011

格式化结果如上, 有直接函数吗?

[解决办法]
If Len(Counts)=1 Then
Counts= "000 "&Counts
End If
If Len(Counts)=2 Then
Counts= "00 "&Counts
End If
If Len(Counts)=3 Then
Counts= "0 "&Counts
End If

读书人网 >ASP

热点推荐