把Date里的东东转成"年月日"格式
DateTimeToStr(DateTime: TDateTime; const FormatSettings: TFormatSettings)
这里的const FormatSettings偶不会用,请大侠写下代码,急,谢啦!!!

解决方案 »

  1.   

    FormatDatetime('yyyymmdd', now());
      

  2.   

    FormatDatetime('yyyymmdd', now());
      

  3.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      showmessage(formatdatetime('yyyy年mm月dd日',now()));
    end;
      

  4.   

    showmessage(formatdatetime('yyyy年MM月dd日',now()));
      

  5.   

    formatdatetime('yyyy"年"mm"月"dd"日',date)
      

  6.   

    formatdatetime('yyyy-mm-dd,date)
      

  7.   

    我是楼主,在strtodate里有没有这样的函数?????????????????
    我也遇到了同样的问题!!!!!!!!!!!!!!
      

  8.   

    开始-->运行 
    regedit
    回车
    HKEY_CURRENT_USER\Control Panel\International\
    sLongDate=yyyy'-'M'-'d'-'
      

  9.   

    function EncodeDate(Year, Month, Day: Word): TDateTime;procedure DecodeDate(Date: TDateTime; var Year, Month, Day: Word);
      

  10.   

    uses shellapi;  
    SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_STIMEFORMAT,PChar('HH:mm:ss'));
    SetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SSHORTDATE,PChar('yyyy-MM-dd'));
      

  11.   

    FormatDatetime('yyyymmdd', now());
    FormatDatetime('yymmdd', now());