把Date里的东东转成"年月日"格式
DateTimeToStr(DateTime: TDateTime; const FormatSettings: TFormatSettings)
这里的const FormatSettings偶不会用,请大侠写下代码,急,谢啦!!!
DateTimeToStr(DateTime: TDateTime; const FormatSettings: TFormatSettings)
这里的const FormatSettings偶不会用,请大侠写下代码,急,谢啦!!!
begin
showmessage(formatdatetime('yyyy年mm月dd日',now()));
end;
我也遇到了同样的问题!!!!!!!!!!!!!!
regedit
回车
HKEY_CURRENT_USER\Control Panel\International\
sLongDate=yyyy'-'M'-'d'-'
SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_STIMEFORMAT,PChar('HH:mm:ss'));
SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SSHORTDATE,PChar('yyyy-MM-dd'));
FormatDatetime('yymmdd', now());