<% function textcut(text,n) if len(text)>cint(n) then textcut = left(text,cint(n)-1)&"..." else textcut = text end if end function function DateFormat(Format,DateAndTime) dim nian,yue,ri,shi,fen,miao,temp temp = Format nian = Year(DateAndTime) yue = Month(DateAndTime) ri = Day(DateAndTime) shi = Hour(DateAndTime) fen = Minute(DateAndTime) miao = Second(DateAndTime) If Len(yue) = 1 Then yue = "0" & yue If Len(ri) = 1 Then ri = "0" & ri If Len(shi) = 1 Then shi = "0" & shi If Len(fen) = 1 Then fen = "0" & fen If Len(miao) = 1 Then miao = "0" & miao temp = replace(temp,"ss",miao) temp = replace(temp,"mm",fen) temp = replace(temp,"hh",shi) temp = replace(temp,"DD",ri) temp = replace(temp,"MM",yue) temp = replace(temp,"YYYY",nian) yue = cstr(cint(yue)) ri = cstr(cint(ri)) shi = cstr(cint(shi)) fen = cstr(cint(fen)) miao = cstr(cint(miao)) nian = right(nian,2) temp = replace(temp,"s",miao) temp = replace(temp,"m",fen) temp = replace(temp,"h",shi) temp = replace(temp,"D",ri) temp = replace(temp,"M",yue) temp = replace(temp,"YY",nian) DateFormat = temp end function %>