请问datetimetostr(now)如何得到2005-06-05 22:18这样的格式吗? ( 积分: 10 )

  • 主题发起人 主题发起人 coolwindfly
  • 开始时间 开始时间
C

coolwindfly

Unregistered / Unconfirmed
GUEST, unregistred user!
hi,all<br> &nbsp;datetimetostr(now)如何得到2005-06-05 22:18这样的格式吗?要简单.不要取字符~<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thanks
 
hi,all<br> &nbsp;datetimetostr(now)如何得到2005-06-05 22:18这样的格式吗?要简单.不要取字符~<br> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;thanks
 
FormatDateTime('YYYY-MM-DD HH:NN',Now)
 
谢谢,我想用datetimetostr
 
接受答案了.
 
function DateTimeToStr(DateTime: TDateTime): string; overload;<br>function DateTimeToStr(DateTime: TDateTime; const FormatSettings: TFormatSettings): string<br>; overload;<br><br>function FormatDateTime(const Format: string; DateTime: TDateTime): string; overload;<br>function FormatDateTime(const Format: string; DateTime: TDateTime; const FormatSettings: TFormatSettings): string; overload;
 
后退
顶部