在asp中用FormatDateTime函数格式化日期时间,FormatDateTime函数有两个参数,第一个参数为你要格式化的时间,第二个参数为格式化时间的格式类型,具体如下:
FormatDateTime(rs("time"),0) 输出 yyyy-mm-dd hh:mm:ss
FormatDateTime(rs("time"),1) 输出 yyyy年mm月dd日
FormatDateTime(rs("time"),2) 输出 yyyy-mm-dd
FormatDateTime(rs("time"),3) 输出 hh:mm:ss
FormatDateTime(rs("time"),4) 输出 mm:ss

asp中怎样输出YYYY-MM-DD时间格式标题图片