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

相关阅读 >>

monthdays:给出一个月的天数

Delphi unigui unicheckbox勾选

Delphi中利用钩子实现qq聊天窗口的修改

Delphi unicode 转 gbk

Delphi加密access文件头

Delphi转换长文件名函数 getshortname

Delphi xe8 form.onshow的一个小问题

Delphi编写涂鸦桌面的小程序

Delphi 合并文本行的函数

Delphi xe android]获取屏幕的物理分辨率

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



打赏

取消

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

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

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

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

评论

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