所以,最好在做轉換時,強制轉換一下,如下
var
t:TDateTime;
fs:TFormatSettings;
begin
fs.ShortDateFormat:='yyyy-mm-dd';
fs.DateSeparator:='-';
t := StrToDate('2010-01-01',fs);
var
t:TDateTime;
fs:TFormatSettings;
begin
fs.ShortDateFormat:='yyyy-mm-dd';
fs.DateSeparator:='-';
t := StrToDate('2010-01-01',fs);