应当要把原来的日期分隔符替换成系统默认的系统分隔符:
tmpstr := '95.12.12';
for I := 1 to length(tmpstr) do
begin
if tmpstr[I] = '.' then
tmpstr[I] := '-'
end;
ShowMessage(datetostr(strtodate(tmpstr)));
tmpstr := '95.12.12';
for I := 1 to length(tmpstr) do
begin
if tmpstr[I] = '.' then
tmpstr[I] := '-'
end;
ShowMessage(datetostr(strtodate(tmpstr)));
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货