代码改变世界

随笔档案-2013年03月

ASP时间格式化函数

2013-03-30 18:02 by 一品黄山, 206 阅读, 收藏,
摘要: t = now()Response.write formatDate(t,4)Function formatDate(Byval t,Byval ftype) dim y, m, d, h, mi, s formatDate="" If IsDate(t)=False Then Exit Function y=cstr(year(t)) m=cstr(month(t)) If len(m)=1 Then m="0" & m d=cstr(day(t)) If len(d)=1 Then d="0" & d h = cs 阅读全文