关于日期与字符串转换时出错的分隔符,小记一下容易忘记
procedure TForm2.Button1Click(Sender: TObject);
var
pDateTime:TDateTime;
begin
FormatSettings.DateSeparator:='-'; //System.SysUtils;
//System.SysUtils.FormatSettings.TimeSeparator:=':';
ShowMessage(System.SysUtils.FormatSettings.ShortDateFormat);
pDateTime:=StrToDateTime('2015-3-28 12:32:1');
ShowMessage(FormatDateTime('yyyy-mm-dd',pDateTime));
ShowMessage(FormatDateTime('yyyy-mm-dd hh:nn:ss',pDateTime));
ShowMessage(FormatFloat('#.000',111113.1415926));
end;