计算日期...(100分)

  • 主题发起人 主题发起人 lz
  • 开始时间 开始时间
L

lz

Unregistered / Unconfirmed
GUEST, unregistred user!
我想知道两个日期之间的差,如2002-06-29和2002-07-28之间相差几天,
在SQL中用一个函数很容易就实现了,但在delphi中怎么实现有没有函数,请教各位!
 
function DaySpan(const ANow, AThen: TDateTime): Double;

Description

Call DaySpan to obtain the difference, in days, between two TDateTime values. Unlike the DaysBetween function, which only counts whole days, DaySpan reports incomplete days as a fraction of an entire day.
 
很好是daysbetween函数

谢谢
 
后退
顶部