关于上传图片文件命名的问题?
这句话上传图片命名的格式:
filename1=year(dtNow) & right( "0 " & month(dtNow),2) & right( "0 " & day(dtNow),2) & right( "0 " & hour(dtNow),2) & right( "0 " & minute(dtNow),2) & right( "0 " & second(dtNow),2) & ranNum & ". "&fileExt
得到的文件名类型:2007041915462545688.jpg
我想改成生成的文件名是这样的:2007_04_19_15462545688.jpg
这样能改吗?
------解决方案--------------------filename1=year(dtNow)& "_ " & right( "0 " & month(dtNow),2)& "_ " & right( "0 " & day(dtNow),2)& "_ " & right( "0 " & hour(dtNow),2) & right( "0 " & minute(dtNow),2) & right( "0 " & second(dtNow),2) & ranNum & ". "&fileExt