Without the system to make up 0, only manual complement 0 'for the Leadbbs database, source board_popfun.asp effect: Date processing' example: gettimevalue (now ()) 'Results: 20041008095752Function GetTimeValue (DateString) DIM TEMP, TEMPSTR ISNULL (DateString ) or istrued = 0 dam function Temp = CSTR (Year (dateString)) if len (Temp) <3 TEMP = Left (Year (Date), 2) & Temp end if tempstr = Temp Temp = CSTR ( Month (dateString)) if len (temp) <2 Temp = "0" & TEMP TEMPSTR = Tempstr & Temp
Temp = CSTR (Date (DateString)) IF LEN (TEMP) <2 TEN TEMP = "0" & TEMP TEMPSTR = Tempstr & Temp
Temp = cstr (Hour (dateString)) if len (temp) <2 Tenstr = "0" & TEMP TEMPSTR = Tempstr & Temp
Temp = CSTR (Minute (dateString) IF LEN (TEMP) <2 THEN TEMP = "0" & TEMP TEMPSTR = Tempstr & Temp
Temp = CSTR (Second (DateString) IF LEN (TEMP) <2 Ten Temp = "0" & TEMP TEMPSTR = Tempstr & Temp
GetTimeValue = cCur (TempStr) End FunctionRem VBScript function isDate defect being prepared, with no stopping on error resume next Function isTrueDate (TStr) Dim T T = TStr T = Replace (Replace (Replace (Replace (Replace (Replace (Replace (T, Year "," - ")," Month "," - ")," Day "," ")," Ama "," ")," Amazing "," ")," " ""), "", "") DIM N1, N2 N1 = INSTR (T, "-") IF n1> 0 THEN N2 = INSTRREV (T, "-") IF N1 = N2 and N1> 0 Then IstrueDate = 0 exit function endiff
N1 = INSTR (T, ":") IF N1> 0 THEN N2 = INSTRREV (T, "-") IF N1 = N2 and n1> 0 Then IstrueDate = 0 exit function endiff