Bootstrap

DELPHI 字符串与日期格式互转

procedure TForm1.Button1Click(Sender: TObject);
var
  D:TDateTime;
  s:string;
begin
  D:=VarToDateTime('05-10-14 04:35PM');
  S:=FormatDatetime('YYYY/MM/DD HH:MM:SS',D);
  showmessage(s);
end;

看到有人这样用VarToDateTime、存下来、强大的日期通杀

来源:https://www.cnblogs.com/jijm123/p/10436233.html

;