国产成人毛片毛片久久网_国产午夜激无码av毛片不_国产乱对白精彩在线播放_av资源站中文字幕_亚洲男人的天堂网站_国产成 人 综合 亚洲网_中国国产激情一区_少妇一级淫片免费放_亚洲一本大道av久在线播放_免费观看美女裸体网站

其他

防御吧作為15年知名老牌域名服務(wù)商,CNNIC和CANN雙認(rèn)證域名注冊(cè)商,已經(jīng)
持續(xù)為500多萬(wàn)個(gè)域名提供服務(wù),包括智能DNS/自由轉(zhuǎn)移/隱私保護(hù)等服務(wù)!
ASP格式化時(shí)間日期補(bǔ)0變2位數(shù)長(zhǎng)日期表示
2019-04-02 14:46:46 【

2019-4-2短日期 變 2019-04-02長(zhǎng)日期

Function FStime(times)
  Dim years,months,days
    if len(times)=0 then exit function
    years=year(times)
    months=right("0"&month(times),2)
    days=right("0"&day(times),2)
    times=years&"-"&months&"-"&days
    FStime=times
End Function

2019-4-1 23:37:5短日期 變 2010-04-01 23:37:05長(zhǎng)日期

Function FLtime(times)
  Dim years,months,days,hours,minutes,seconds
    if len(times)=0 then exit function
    years=year(times):months=right("0"&month(times),2)
    days=right("0"&day(times),2):hours=right("0"&hour(times),2)
    minutes=right("0"&minute(times),2):seconds=right("0"&second(times),2)
    FLtime=years&"-"&months&"-"&days&" "&hours&":"&minutes&":"&seconds
End Function

<%

Rem Pw_Sys 日期格式轉(zhuǎn)換函數(shù)

function DateTimeFormat(DateTime,Format)
select case Format
case "1"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"&Right("0" & Day(DateTime),2)&"日"
case "2"
DateTimeFormat=""&month(DateTime)&"月"&Right("0" & Day(DateTime),2)&"日"
case "3"
DateTimeFormat=""&year(DateTime)&"-"&month(DateTime)&"-"&Right("0" & Day(DateTime),2)&""
case "4"
DateTimeFormat=""&year(DateTime)&"/"&month(DateTime)&"/"&Right("0" & Day(DateTime),2)&""
case "5"
DateTimeFormat=""&month(DateTime)&"/"&Right("0" & Day(DateTime),2)&""
case "6"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"&Right("0" & Day(DateTime),2)&"日<font color=red> "&FormatDateTime(DateTime,4)&"</font>"
case "7"
  temp="星期日,星期一,星期二,星期三,星期四,星期五,星期六"
  temp=split(temp,",")
  DateTimeFormat=temp(WeekRight("0" & Day(DateTime),2)-1)
case "8"
DateTimeFormat=""&month(DateTime)&"-"&Right("0" & Day(DateTime),2)&""
case "9"
if len(hour(DateTime)) = 1 then
str="0"&hour(DateTime)
else
str=hour(DateTime)
end if
DateTimeFormat=DateTimeFormat(DateTime,1)&" "&str&":"&Minute(DateTime)
case "10"
DateTimeFormat=""&year(DateTime)&"年"&month(DateTime)&"月"
case else
DateTimeFormat=DateTime
end select
end function

%>


程序代碼(把yyyy-mm-dd格式的日期中的月份和日期轉(zhuǎn)換成兩位數(shù)字的方法)

dim today
today=Date '避免重復(fù)調(diào)用Date,所以賦值給一個(gè)變量
today=Year(today) & "-" & Right("0" & Month(today),2) & "-" & Right("0" & Day(today),2)

以上就是東方網(wǎng)域小編為大家整理的ASP格式化時(shí)間日期補(bǔ)0相關(guān)內(nèi)容,詳情可以瀏覽網(wǎng)站的相關(guān)內(nèi)容或在線聯(lián)系客服,希望以上的對(duì)你有所幫助。


】【打印關(guān)閉】 【返回頂部
分享到QQ空間
分享到: 
上一篇防御吧2019五一放假通知 下一篇centos使用yum安裝apache+php+mys..

立足首都,輻射全球,防御吧專注云防御及云計(jì)算服務(wù)15年!

聯(lián)系我們

服務(wù)熱線:13051179500 18910191973
企業(yè)QQ:1245940436
技術(shù)支持:010-56159998
E-Mail:xihedata.com
Copyright ? 2003-2016 fangyuba. 防御吧(完美解決防御與加速) 版權(quán)所有 增值許可:京B2-20140042號(hào)
售前咨詢
公司總機(jī):18910191973
24小時(shí)電話:010-56159998
投訴電話:18910191973
值班售后/技術(shù)支持
售后服務(wù)/財(cái)務(wù)
備案專員
緊急電話:18610088800