Loveyuki's BLOG

L-BLOG.NET, The Matrix Reloaded.

标签:ASP
一些 ASP 方面的小技巧和代码
Loveyuki | 原创作品 | 2007-11-29 10:49 | 1533 点击 | 4 评论 | ASP
  1. 计算分页,嘿嘿一次搞定不用判断
    intNumPage = Abs(Int(-(intNumRecord/intPerPage)))
  2. 将日期格式化为RFC822格式,以前的方法麻烦哦,看这个简单的
    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
 

版权所有©2007-2008, Loveyuki.com | 系统:Bitrac | 皮肤:Blog Pixel | 空间域名:光辉互联 易联网络