+//\82Æ\82«\82½\82Ü2003 02 08 0:32:13\82±\82ñ\82È\8c`\8e®\82Ì\93ú\95t\82ª\82 \82é\82Ì\82Å\82»\82ê\82ð
+// 2003/02/08 0:32:13\82É\95Ï\8a·\82·\82é
+function ConvertDateTimeString( inDateTimeString : string) : TDateTime;
+const
+ ZERO_DATE_STRING : string = '1970/01/01 0:00:00';
+var
+ i : Integer;
+ y: Integer;
+ m: Integer;
+ d: Integer;
+ hour: Integer;
+ min: Integer;
+ sec: Integer;
+begin
+ if inDateTimeString = '' then
+ inDateTimeString := ZERO_DATE_STRING;
+
+ if ( AnsiPos('/', inDateTimeString ) = 0 ) and
+ ( AnsiCompareStr( DateTimeToStr(ZERO_DATE), inDateTimeString) <> 0 ) then begin
+ for i := 0 to 1 do begin
+ Insert('/',inDateTimeString, AnsiPos(' ', inDateTimeString) + 1 );
+ Delete(inDateTimeString, AnsiPos(' ', inDateTimeString), 1);
+ end;
+ end;
+ try
+ Result := StrToDateTime( inDateTimeString );
+ except
+ if( inDateTimeString[5] = '/' ) and ( inDateTimeString[8] = '/' ) then begin
+ y := StrToIntDef( Copy(inDateTimeString, 1, 4), 1970 );
+ m := StrToIntDef( Copy(inDateTimeString, 6, 2), 1 );
+ d := StrToIntDef( Copy(inDateTimeString, 9, 2), 1 );
+ hour := 0; min := 0; sec := 0;
+
+ if Length(inDateTimeString) > 11 then begin
+ if( inDateTimeString[13] = ':' ) and ( inDateTimeString[16] = ':' ) then begin
+ hour := StrToIntDef( Copy(inDateTimeString, 12, 1), 0 );
+ min := StrToIntDef( Copy(inDateTimeString, 14, 2), 0 );
+ sec := StrToIntDef( Copy(inDateTimeString, 17, 2), 0 );
+ end else if( inDateTimeString[14] = ':' ) and ( inDateTimeString[17] = ':' ) then begin
+ hour := StrToIntDef( Copy(inDateTimeString, 12, 2), 0 );
+ min := StrToIntDef( Copy(inDateTimeString, 15, 2), 0 );
+ sec := StrToIntDef( Copy(inDateTimeString, 18, 2), 0 );
+ end;
+ end;
+ try
+ Result := EncodeDateTime(y ,m, d, hour, min, sec, 0);
+ except
+ Result := ZERO_DATE;
+ end;
+ end else
+ Result := ZERO_DATE;
+ end;
+
+
+ // Result := inDateTimeString;
+end;
+//! \83T\83u\83W\83F\83N\83gURL\8eæ\93¾