ASP月日不足两位补零函数

'========月日不足两位补零函数==================
function FillZero(str)
   ttt=str
   if len(str)=1 then
      ttt="0" & str
   end if
   FillZero=ttt
end function


function ConvertDate(tDate)
   ttt=tDate
   if isdate(tDate) then
      ttt=FillZero(month(tDate)) & "/" & FillZero(day(tDate))
   end if
   ConvertDate=Year(tDate)& "/" &ttt
end function
'========月日不足两位补零函数==================

posted @ 2011-03-24 18:04  moretop  阅读(646)  评论(0编辑  收藏  举报