A Astimegoby Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-12 #1 比如你用datetimepicker中得到的时间2001-9-12 有什么简单的函数可以转换成9/25/2001
L lukee Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-12 #2 如果不嫌麻烦,可以用datetostr把日期转换成字符,处理后,再用strtodate转换成日期。
S sunwb Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-12 #3 FormatDatetime('m"/"d"/"yyyy',datetimepicker.date);
杜 杜宝 Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-12 #4 用formatDateTime 如: procedure TForm1.Button1Click(Sender: TObject); var s:String; ADate:TDate; begin ADate:=StrToDate('2001-05-01'); s:=formatDateTime('mm/dd/yyyy',ADate); ShowMessage(s); end;
用formatDateTime 如: procedure TForm1.Button1Click(Sender: TObject); var s:String; ADate:TDate; begin ADate:=StrToDate('2001-05-01'); s:=formatDateTime('mm/dd/yyyy',ADate); ShowMessage(s); end;