将两个时间类型数据比较大小,应该怎样做?(50分)

  • 主题发起人 主题发起人 Iveny
  • 开始时间 开始时间
I

Iveny

Unregistered / Unconfirmed
GUEST, unregistred user!
将两个时间类型数据比较大小,应该怎样做?
 
时间类型实际上就是double类型,你知道该如何比较大小了吧?
:)
 
function DaysBetween(const ANow, AThen: TDateTime): Integer;

Description

Call DaysBetween to obtain the difference, in days, between two TDateTime values.

DaysBetween counts only whole days that have elapsed. Thus, DaysBetween reports the difference between Dec 31, 1999 11:59 PM and Jan 1, 2000 11:58 PM as 0 because the difference is one minute short of an entire day.
 
我是这样比较的
if date1>date2 then
我一直是这样用的,很简单阿?
 
其实
TDateTime = double
 
多看看书吧
 
后退
顶部