USEGEAR

导航

DateTime日期格式转换,不受系统格式的影响

  Application.Initialize;
  with FormatSettings do
  begin
    ShortDateFormat := 'yyyy-mm-dd';
    LongDateFormat := 'yyyy-mm-dd';
    ShortTimeFormat := 'hh:nn:ss';
    LongTimeFormat := 'hh:nn:ss';
    DateSeparator := '-';
    TimeSeparator := ':';
  end;

posted on 2016-12-29 15:35  USEGEAR  阅读(279)  评论(0编辑  收藏  举报