s1:='12:00:00'
s2:='14:00:00'
s:=strtotime(now);
可否这样做判断:if s>s1 and s<s2 then或是:
var
s1,s2:TdateTime;
begin
s1:=strtotime('12:00:00');
s2:=strtotime('14:00:00');
if now>s1 and now<s2 then
...
end;这样不行呀,请问该如何做?
s2:='14:00:00'
s:=strtotime(now);
可否这样做判断:if s>s1 and s<s2 then或是:
var
s1,s2:TdateTime;
begin
s1:=strtotime('12:00:00');
s2:=strtotime('14:00:00');
if now>s1 and now<s2 then
...
end;这样不行呀,请问该如何做?
var
s,s1,s2:TdateTime;
begin
s1:=strtotime('12:00:00');
s2:=strtotime('14:00:00');
s := now;
s := s - Trunc(s);
if (s>s1) and (s<s2) then
...
end;
s1,s2:TdateTime;
begin
s1:=strtotime('12:00:00');
s2:=strtotime('14:00:00');
if (comparetime(s1, now) = -1) and (CompareTime(s2, now) = 1) then
showmessage('ok');
end;