Delphi 时间函数介绍.docVIP

  • 2
  • 0
  • 约9.01千字
  • 约 18页
  • 2017-05-11 发布于河南
  • 举报
Delphi 时间函数介绍

Delphi 时间函数介绍 Delphi 时间函数介绍2007-10-29 17:34Unit DateUtils function DateOf(const Avalue: TDateTime): TDateTime; 描述 使用 DateOf 函数用来把一个 TDateTime 类型的变量转变成一个 只带有日期的 TDateTime 类型变量。 例如: showmessage(DateTimetostr(dateof(now()))); 你得到的是 2003/03/19 而 showmessage(DateTimetostr((now()))); 得到的是 2003/03/19 10:50:49 ●function DateTimeToStr(DateTime: TDateTime): string; 描述 DateTimeToString 函数将 TDateTime 类型的参数 DateTime 转换成一个 字符串,使用给定的全局变量 ShortDateFormat 的格式,时间部分按照 给定的全局变量 LongTimeFormat 的格式。 其中 DateTime 为零的部分将不会显示出来。 例如: ShortDateFormat:=yyyy mm dd; showmessage(DateTimeto

文档评论(0)

1亿VIP精品文档

相关文档