28,391
社区成员
发帖
与我相关
我的任务
分享
response.write formatdate(selldate,"y-m-d")
response.write formatdate(selldate,"y-m-d h:n:s")
Function formatdate(byval sdate,byval stype)
Dim y,m,d,h,n,s,otime
y = Year(sdate)
m = right("00" & Month(sdate),2)
d = right("00" & Day(sdate),2)
h = right("00" & Hour(sdate),2)
n = right("00" & Minute(sdate),2)
s = right("00" & Second(sdate),2)
otime = stype
otime = Replace(otime,"timestamp",DateDiff("s","1970-01-01 08:00:00",sdate))
otime = Replace(otime,"y",y)
otime = Replace(otime,"m",m)
otime = Replace(otime,"d",d)
otime = Replace(otime,"h",h)
otime = Replace(otime,"n",n)
otime = Replace(otime,"s",s)
formatdate = otime
End Function
a = '1995/11/11'
b = a.replace(/\//g, '-')
console.log(b)
// 1995-11-11