if formatdatetime('yyyy.mm.dd',date1)>formatdatetime('yyyy.mm.dd',date2) then
begin
//Timer1.Interval :=18000000;
//daystatistic;
//manNotice;
//Timer1.Interval :=60000;
end;
请问这样可以比较吗?
begin
//Timer1.Interval :=18000000;
//daystatistic;
//manNotice;
//Timer1.Interval :=60000;
end;
请问这样可以比较吗?
解决方案 »
- delphi string GBK编码
- 谁来讲讲delphi中的伪代码~
- 哪个朋友会VC又会delphi?能否帮我翻译一段代码为delphi的,或者解释下?
- 请帮我看看这段代码错在哪里?
- 请问一下采用b/s比C/S好在哪里?最好推荐一本这方面的书籍
- Could not create output file "****.dcu"
- delphi中是否有类似vb的debug.print调试工具
- 请问:是不是有现成的中文语音库,怎么调用TTS ???
- 有关包的安装?
- 请问哪里有的下delphi6.0的补丁程序啊,请给个具体的网址,官方网址全是E文,看不懂啊
- 公司招了几个新人!想做个培训计划(Delphi),大家探讨一下!
- ApdComPort控件的接收问题.
上述的date1和date2都是Tdatetime类型,那我可以直接比较吗,就是不用在通过formatdatetime函数了。
if date1>date2 then这样直接比较可以吗?
date1,date2:Tdatetime;
ADOQuery1.close;
ADOQuery1.SQL.text:='select getdate()';
ADOQuery1.open;
date1:=ADOQuery1.Fields[0].asdatetime;
ADOQuery1.close;
ADOQuery1.SQL.text:='select rjday from systemparam';
ADOQuery1.open;
date2:=ADOQuery1.Fields[0].asdatetime;
ADOQuery1.Close;
if formatdatetime('yyyy.mm.dd',date1)>formatdatetime('yyyy.mm.dd',date2) then
begin
Timer1.Interval :=18000000;
daystatistic;
manNotice;
Timer1.Interval :=60000;
end;
这个程序趋前可以运行,可是上面的兄弟说不可以比较,那么这个程序是不是有问题呀?有问题的话,可是它为什么还可以运行呢?