delphi 获取国外格式日期时间


本文整理自网络,侵删。

 
function NowGMT: TDateTime;
var
  ST: TSystemTime;
begin
  // This Windows API function gets system time in UTC/GMT
  // see http://msdn.microsoft.com/en-us/library/ms724390
  GetSystemTime(ST);
  Result := SystemTimeToDateTime(ST);
end;


function RFC1123DateStamp: string;
const
  // Pattern to create RFC1123 date formats
  cRFC1123Pattern = 'ddd, dd mmm yyyy HH'':''nn'':''ss ''GMT''';
begin
  Result := FormatDateTime(cRFC1123Pattern, NowGMT);
end;


procedure TForm1.Button1Click(Sender: TObject);
begin
memo1.text:=RFC1123DateStamp;

end;

相关阅读 >>

Delphi 查看指定进程占用端口

Delphi下的纯pascal的十六进制转十进制

Delphi分享pos函数。(比fastpos还要快)

Delphi 通过进程id获取进程名

Delphi中使用goo.gl(google的缩短url服务)api

Delphi 取得txt文件编码

Delphi 关闭指定窗口

Delphi 系统日期时间格式设置

Delphi wininet带进度下载http文件

Delphi memo1 光标跟随鼠标移动

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



打赏

取消

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

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

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

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

评论

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