<% 'This function effect: Format the display time according to the specified parameters. 'NumFormat = 1: Transform time into YYYY-MM-DD HH: NN format. 'NumFormat = 2: Transform time into YYYY-MM-DD format. 'NumFormat = 3: Transform time into HH: NN format. 'NumFormat = 4: Transform time into YYYY year MM Month DD day HH NN points. 'NumFormat = 5: Transform time into YYYY year MM month DD day format. 'NumFormat = 6: Transform time into HH NN points. 'NumFormat = 7: Transform time into YYYY year mm month DD day × format. 'NumFormat = 8: Transform time into YYMMDD format. 'NumFormat = 9: Transform time into MMDD format.
Function formatdate (Shijian, NumFormat) DIM YSTR, MSTR, DSTR, HSTR, NSTR 'variable meanings are age strings, month strings, Japanese strings, time string, split string if isnull (shijian) THEN NumFormat = 0 Else YSTR = DatePart ("YYYY", Shijian) IF DatePart ("M", Shijian> 9 mstr = DatePart ("M", Shijian) Else mstr = "0" & DatePart ("M", Shijian) End ififf DatePart ("D", Shijian> 9 DSTR = DatePart ("D", Shijian) Else DSTR = "0" & DatePart ("D", Shijian) End if IF datepart ("H", Shijian> 9 THEN HSTR = DATEPART ("H", Shijian) Else HSTR = "0" END IF DATEPART ("N", Shijian> 9 THEN NSTR = DatePart ("N", Shijian) Else NSTR = "0" & datepart ("n", shiian) end if end if select case = "Case 1 Formator = YSTR &" - "& MSTR &" - "& DSTR &" & HSTR & ":" & nstr case 2 formatdate = ystr & " - "& mstr &" - "& DSTR Case 3 Formator = HSTR &": "Years" & MSTDATE = YSTR & DSTR & "Japan" & HSTR & "& NSTR &" Case 5 Formator = YSTR & "Year" & mstr & " Month "& DSTR &" "Case 6 Formator = HSTR &" "& nstr &" Division "Case 7 Formator = YSTR &" New Year "& MSTR &" Month "& DSTR &" Day "& WeekdayName (Weekday) Case 8 Formator = Right (YSTR, 2) &
MSTR & DSTR CASE 9 FORMATDATE = MSTR & DSTR End SELECTED FUNCTION%> Now use ASP.NET everything is much simple, or written commemorates the original years of ASP.