1. 论坛系统升级为Xenforo,欢迎大家测试!
    排除公告

[ASP] 将日期格式化为 RFC822 格式

本帖由 Ulysses2006-03-18 发布。版面名称:后端开发

  1. Ulysses

    Ulysses New Member

    注册:
    2006-02-05
    帖子:
    10,018
    赞:
    16
    代码:
    Function DateToRFC822(byVal dtaVal)
     Dim strCurLocale : strCurLocale = GetLocale()
     SetLocale("en-gb")
     dtaVal = CDate(dtaVal)
     DateToRFC822 = WeekdayName(Weekday(dtaVal),True)&", "& _
           Right("0"&Day(dtaVal),2)&" "& _
           MonthName(Month(dtaVal),True)&" "& _
           Year(dtaVal)&" "& _
           Right("0"&Hour(dtaVal),2)&":"& _
           Right("0"&Minute(dtaVal),2)&":"& _
           Right("0"&Second(dtaVal),2)&" "& _
           " +0800"
     SetLocale(strCurLocale)
    End Function
    来源:http://www.i170.com/user/Loveyuki/Article_19015 (loveyuki)