已经完成。
function StrToDateEx(mStr: string): TDate
const
cShortMonthNames: array[1..12] of string = (
'Jan', 'Feb', 'Mar', 'Apr',
'May', 'Jun', 'Jul', 'Aug',
'Sep', 'Oct', 'Nov', 'Dec')
var
I: Integer
vOldShortDateFormat: string
begin
for I := 1 to 12 do
mStr := StringReplace(mStr, cShortMonthNames, IntToStr(I) + '-',
[rfIgnoreCase])
mStr := StringReplace(mStr, ',', '-', [rfReplaceAll])
mStr := StringReplace(mStr, ' ', '', [rfReplaceAll])
vOldShortDateFormat := ShortDateFormat
ShortDateFormat := 'mm-dd-yyyy'
try
Result := StrToDate(mStr)
finally
ShortDateFormat := vOldShortDateFormat
end
end
{ StrToDateEx }
对这个函数进行了修改就可以了。