哪位有方法把 dd/mm/yyyy的字符串 格式化成yyyy-mm-dd
【总监】Dawood(656317124) 10:00:42
啊,找到方法了.
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;
【总监】Dawood(656317124) 10:00:42
啊,找到方法了.
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;