简单问题,来者有分? 为什么我的VB中Format不能用! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 不会吧,使用format是不需要引用什么的。试试msgbox format(now,"yyyy-MM-dd")如果能正确显示(2003-03-26)就能用。 你指的Format Function还是Format命令? 'Format函数的用法'Format(expression[, format[, firstdayofweek[, firstweekofyear]]])'例子:Dim MyTime, MyDate, MyStrMyTime = #17:04:23#MyDate = #January 27, 1993#' Returns current system time in the system-defined long time format.MyStr = Format(Time, "Long Time")' Returns current system date in the system-defined long date format.MyStr = Format(Date, "Long Date")MyStr = Format(MyTime, "h:m:s") ' Returns "17:4:23".MyStr = Format(MyTime, "hh:mm:ss AMPM") ' Returns "05:04:23 PM".MyStr = Format(MyDate, "dddd, mmm d yyyy") ' Returns "Wednesday, ' Jan 27 1993".' If format is not supplied, a string is returned.MyStr = Format(23) ' Returns "23".' User-defined formats.MyStr = Format(5459.4, "##,##0.00") ' Returns "5,459.40".MyStr = Format(334.9, "###0.00") ' Returns "334.90".MyStr = Format(5, "0.00%") ' Returns "500.00%".MyStr = Format("HELLO", "<") ' Returns "hello".MyStr = Format("This is it", ">") ' Returns "THIS IS IT". 我想会不会是你的format坏了阿hen简单的不是吗? VB+Access软件打包问题!在线等,谢谢! 窗体的icon怎么设置为只读 大家来看看这是MD5么? VB 换肤的问题 怎样用文本框显示表中指定字段的值 怎么用timer判断超时? 在批量导入的时候如果出现错误,如何捕捉? 请教高手,怎样取得快捷方式里指向的目标? 问一个关于进程的问题!zyl910请进来帮帮我。 如何对数据建立单一索引?? 如何固定LISTVIEW的表格宽度,让他不可以拉伸? 怎么得到记录集的某一列?
试试msgbox format(now,"yyyy-MM-dd")
如果能正确显示(2003-03-26)就能用。
'Format(expression[, format[, firstdayofweek[, firstweekofyear]]])'例子:
Dim MyTime, MyDate, MyStr
MyTime = #17:04:23#
MyDate = #January 27, 1993#' Returns current system time in the system-defined long time format.
MyStr = Format(Time, "Long Time")' Returns current system date in the system-defined long date format.
MyStr = Format(Date, "Long Date")MyStr = Format(MyTime, "h:m:s") ' Returns "17:4:23".
MyStr = Format(MyTime, "hh:mm:ss AMPM") ' Returns "05:04:23 PM".
MyStr = Format(MyDate, "dddd, mmm d yyyy") ' Returns "Wednesday,
' Jan 27 1993".
' If format is not supplied, a string is returned.
MyStr = Format(23) ' Returns "23".' User-defined formats.
MyStr = Format(5459.4, "##,##0.00") ' Returns "5,459.40".
MyStr = Format(334.9, "###0.00") ' Returns "334.90".
MyStr = Format(5, "0.00%") ' Returns "500.00%".
MyStr = Format("HELLO", "<") ' Returns "hello".
MyStr = Format("This is it", ">") ' Returns "THIS IS IT".
hen简单的不是吗?