System.DateUtils 1. DateOf、TimeOf 简单修饰功能

编译版本:Delphi XE7

{ Simple trimming functions } // 简单修饰功能

function DateOf(const AValue: TDateTime): TDateTime; inline; // 获取日期
function TimeOf(const AValue: TDateTime): TDateTime; inline; // 获取时间

implementation

function DateOf(const AValue: TDateTime): TDateTime;
begin
  Result := Trunc(AValue); // 截取整数部分
end;

function TimeOf(const AValue: TDateTime): TDateTime;
begin
  Result := Frac(AValue); // 截取小数部分
end;

原文地址:https://www.cnblogs.com/BlackList-Sakura/p/4759895.html