const TMonth:array[1..12] of string=('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'); var s:string; a:TDateTime; Y,M,D:integer; begin s:='Tue,13 Jun 2006 13:05:59'; D:=StrToInt(copy(s,pos(',',s)+1,2)); for M:=1 to 12 do if TMonth[M]=copy(s,pos(' ',s)+1,3) then break; Y:=StrToInt(copy(s,pos(' ',s)+5,4)); a:=EncodeDate(Y,M,D); a:=StrToDateTime(DateTimeToStr(a)+' '+copy(s,pos(' ',s)+10,8)); ShowMessage(DateTimeToStr(a)); end;
var s:string;
a:TDateTime;
Y,M,D:integer;
begin
s:='Tue,13 Jun 2006 13:05:59';
D:=StrToInt(copy(s,pos(',',s)+1,2));
for M:=1 to 12 do
if TMonth[M]=copy(s,pos(' ',s)+1,3) then break;
Y:=StrToInt(copy(s,pos(' ',s)+5,4));
a:=EncodeDate(Y,M,D);
a:=StrToDateTime(DateTimeToStr(a)+' '+copy(s,pos(' ',s)+10,8));
ShowMessage(DateTimeToStr(a));
end;