Flg. kan klare det:
function TimestampToDateTimeEx(Stamp: String): TDateTime;
var
Year, Month, Day, Hour, Minute, Second: String;
begin
if Length(Stamp) <> 14 then
raise Exception.Create('Timestamp length must på 14');
Year := Copy(Stamp, 1, 4);
Month := Copy(Stamp, 5, 2);
Day := Copy(Stamp, 7, 2);
Hour := Copy(Stamp, 9, 2);
Minute := Copy(Stamp, 11, 2);
Second := Copy(Stamp, 13, 2);
Result := EncodeDateTime(StrToInt(Year), StrToInt(Month), StrToInt(Day), StrToInt(Hour), StrToInt(Minute), StrToInt(Second), 0);
end;
Btw. du skal tilføje DateUtils til din Uses for at det virker!
MH.
The-Freak
Livet er for kort til at kede sig.