CompareDate
简述
比较时间A所属的日期和时间B所属的日期的大小,返回它们的关系
如果A的日期比B的日期早,返回-1
如果A的日期比B的日期晚,返回+1
如果A的日期与B的日期相同,返回0
CompareDate(A; B: TDateTime): Integer;
名称 | 类型 | 说明 |
---|
A | TDateTime | 日期时间类型,日期时间 |
B | TDateTime | 日期时间类型,日期时间 |
返回 | Integer |
整数。 |
result:=CompareDate(strtodatetime("2011-08-10"),strtodatetime("2011-08-11"));
return result; //输出: -1
TDateTime