推荐下天枫常用ASP函数封装,推荐大家使用(21)
FormatSize=Formatnumber(dsize/1073741824,2) & " GB"
elseif dsize>=1048576 then
FormatSize=Formatnumber(dsize/1048576,2) & " MB"
elseif dsize>=1024 then
FormatSize=Formatnumber(dsize/1024,2) & " KB"
else
FormatSize=dsize & " Byte"
end if
End Function
'****************************************************
'函数名:FormatTime
'作 用:时间格式化
'参 数:DateTime ----要格式化的时间
' Format ----格式的形式
'****************************************************
Public Function FormatTime(DateTime,Format)
select case Format
case "1"
FormatTime=""&year(DateTime)&"年"&month(DateTime)&"月"&day(DateTime)&"日"
case "2"
FormatTime=""&month(DateTime)&"月"&day(DateTime)&"日"
case "3"
FormatTime=""&year(DateTime)&"/"&month(DateTime)&"/"&day(DateTime)&""
case "4"
FormatTime=""&month(DateTime)&"/"&day(DateTime)&""
case "5"
FormatTime=""&month(DateTime)&"月"&day(DateTime)&"日"&FormatDateTime(DateTime,4)&""
case "6"
temp="周日,周一,周二,周三,周四,周五,周六"
temp=split(temp,",")
FormatTime=temp(Weekday(DateTime)-1)
case Else
内容版权声明:除非注明,否则皆为本站原创文章。