什么函数可以实现把数据前边多余的0去处掉?00000359.00
00012359.00只要
359.00
12359.00谢谢

解决方案 »

  1.   

    Format 函数示例
    本示例显示用 Format 函数做格式化输出的不同用法。对于日期分隔号(/),时间分隔号(:),以及 AM/ PM 等文本而言,其真正的显示格式会因计算机上的国际标准不同而有所差异。在开发阶段,日期与时间是以短日期的格式,配合代码的国际标准来显示的。而在运行时,短日期则是根据系统的国际标准而定,而系统的国际标准和代码的国际标准可能并不相同。本示例中是假设国际标准为 English/United States。MyTime 及 MyDate 在开发环境下,使用系统的短日期设置显示出来的。Dim MyTime, MyDate, MyStr
    MyTime = #17:04:23#
    MyDate = #January 27, 1993#' 以系统设置的长时间格式返回当前系统时间。
    MyStr = Format(Time, "Long Time")' 以系统设置的长日期格式返回当前系统日期。
    MyStr = Format(Date, "Long Date")MyStr = Format(MyTime, "h:m:s")   ' 返回 "17:4:23"。
    MyStr = Format(MyTime, "hh:mm:ss AMPM")   ' 返回 "05:04:23 PM"。
    MyStr = Format(MyDate, "dddd, mmm d yyyy")   ' 返回 "Wednesday, Jan 27 1993"。
    ' 如果没有指定格式,则返回字符串。
    MyStr = Format(23)   ' 返回 "23"。' 用户自定义的格式。
    MyStr = Format(5459.4, "##,##0。00")   ' 返回 "5,459.40"。
    MyStr = Format(334。9, "###0。00")   ' 返回 "334.90"。
    MyStr = Format(5, "0。00%")   ' 返回 "500.00%"。
    MyStr = Format("HELLO", "<")   ' 返回 "hello"。
    MyStr = Format("This is it", ">")   ' 返回 "THIS IS IT"。