2003-4-9 15:27:16减掉30分钟,应该如何表示
解决方案 »
- list index out of bounds。。求指导
- 请问怎样能使panel可以移动?
- 关于错误的
- 请问,如何USES引入WMPLib和RealAudioObjects_TLB?
- 100分求教 多线程序数据共享问题
- Borland 的scktsrvr.exe奇怪的问题!
- 一个DLL注入后,读取数据的问题!
- 学Delphi有一段时间了,但进步太慢,苦恼中.........
- DBGridEH问题
- 一个挺简单的问题,涉及到到MDI应用程序的问题
- 请教如何应用Delphi中New Item中的Service 和 Service Application,两者的区别是什么?
- 诚邀:Delphi + OpenGL 开发高手!
var
t1,t2:TdateTime;
begin
t1:=strtodatetime('2003-4-9 15:27:16');
t2:=strtotime('00:30:00');
showmessage(datetimetostr(t1-t2));
end;
var
t:TdateTime;
begin
t:=strtodatetime('2003-4-9 15:27:16')-30/60/24;
end;
Returns a date/time value shifted by a specified number of minutes.UnitDateUtilsCategorydatetime routinesDelphi syntax:function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64 = 1): TDateTime;
__int64 ANumberOfMinutes = 0x000000001);DescriptionIncMinute returns the value of the AValue parameter, incremented by ANumberOfMinutes minutes. ANumberOfMinutes can be negative, to return a date and time N minutes prior to AValue.
var
t1,t2:TdateTime;
begin
t1:=strtodatetime('2003-4-9 15:27:16');
t2:=t1-30*60;//最小单位是秒,用分钟比较苦难就干脆用秒好了。
end;