delphi 固定保持DateTime日期格式


本文整理自网络,侵删。

 打开项目代码,


在Application.Initialize后面加入对FormatSettings的设置:

  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;

现在不管什么系统,都采用上面的日期与时间格式。


来源:http://blog.sina.com.cn/s/blog_44fa172f0102wmwd.html

相关阅读 >>

Delphi 使用fastscript调试脚本

Delphi 实现窗口记住关闭时的坐标位置

Delphi drawing text 绘制文本

Delphi结合winrar生成自解压文件

Delphi 2009 泛型容器单元(generics.collections)[1]: tlist<t>

Delphi中的strpas功能

Delphi 中 tjpegimage 中的一处问题修复

Delphi屏蔽指定热键

Delphi system.net.httpclient 下载

Delphi获取android上的imei

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...