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;