DateTimeToStr和DateTimeToString 有什么区别?(20分)

  • 主题发起人 主题发起人 jomee
  • 开始时间 开始时间
J

jomee

Unregistered / Unconfirmed
GUEST, unregistred user!
书上是这样说的。
DateTimeToStr 按缺省格式将日期和时间值转换为字符串;特定格式转换可用 FormatDateTime函数
DateTimeToString 按缺省格式将日期和时间值拷贝到字符串缓冲区
但我不知道“DateTimeToString”是什么意思。
 
没看看帮助么
procedure DateTimeToString(var Result: string;
const Format: string;
DateTime: TDateTime);
Description
DateTimeToString converts the TDateTime value given by DateTime using the format string given by Format into the string variable given by Result. For Formats supported, refer to FormatDateTime
.
 
区别只是函数原型不一样,你看看VCL源代码就知道了,实际上DateTimeToStr是简单调用DateTimeToString完成的。
 
后退
顶部