这个不行?
Format
Format用于格式化数据。
在打印或者显示的时候,用户可能有一些特殊的格式要求,例如固定小数位数,用中文的年月日代替日期中的分割横线等等,Format函数正是针对这种需要而提供的。
语法:
Format(Value, Expression)
Value: 数据
Expression: 格式表达式
例如:
Output.Show(Format(1,"000"))
Output.Show(Format(1,"""A""000"))
Output.Show(Format(1.2,"0.00"))
Output.Show(Format(#12/31/2008#,"yyyy年MM月dd日"))
上述代码的输出为:
001
A001
1.20
2008年12月31日
请参考:
格式化数字
格式化日期和时间