求一函数,等获取两个时间点相差多少分钟的。

解决方案 »

  1.   

    Returns the number of minutes between two specified TDateTime values.UnitDateUtilsCategorydatetime routinesDelphi syntax:function MinutesBetween(const ANow, AThen: TDateTime): Int64;C++ syntax:extern PACKAGE __int64 __fastcall MinutesBetween(const System::TDateTime ANow, const System::TDateTime AThen);DescriptionCall MinutesBetween to obtain the difference, in minutes, between two TDateTime values. MinutesBetween counts only entire minutes. Thus, MinutesBetween reports the difference between 9:00:00 AM and 9:00:59:999 AM as 0 because the difference is one millisecond short of an entire minute.