W wind_2005 Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-12 #1 各位高人,请问如何将澳大利亚日期格式的字符串,如:'Monday, 12 February 2007'转换为yyyy-MM-dd HH:mm:nn格式,谢谢了!~
W wind_2005 Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-13 #2 自己顶一把了,那位高人知道啊? windows中不是设置为不同地区,系统日期格式不同吗,是不是有相关的API函数啊,谢谢了!
A Avalon Unregistered / Unconfirmed GUEST, unregistred user! 2007-02-13 #5 //没有Monday捣乱就好了 procedure TForm1.Button1Click(Sender: TObject); var D: TDate; v: string; begin v := 'Monday, 12 February 2007'; v := Trim(copy(v, pos(',',v) + 1, length(v))); D:= VarToDateTime(v); ShowMessage(FormatDateTime('dddd yyyy-mm-dd HH:nn:ss ', D)); end;
//没有Monday捣乱就好了 procedure TForm1.Button1Click(Sender: TObject); var D: TDate; v: string; begin v := 'Monday, 12 February 2007'; v := Trim(copy(v, pos(',',v) + 1, length(v))); D:= VarToDateTime(v); ShowMessage(FormatDateTime('dddd yyyy-mm-dd HH:nn:ss ', D)); end;