delphi中的类似sql中的dateadd函数???(30分)

T

tp168

Unregistered / Unconfirmed
GUEST, unregistred user!
delphi中是否有类似sql中的dateadd函数,可以返回给定日期的前几天或前几个月
的日期???
 
不要只要用+,- 可以了
 
你好,chshanghai,怎么计算???
 
uses dateutils;
跟天有關:IncDay()
跟月有關:IncMonth()
跟年有關:IncYear()
可參考幫助。
舉一個例子:
明年今日:IncYear(date,1);
去年今日:Incyear(date,-1);
其它類似。

 
接受答案了.
 
顶部