如何计算预定的时间?格式为00:00:00

wealsh 2005-04-14 10:13:39
比如 当前时间为8:05:01 在45 分钟后它应该为8:50:01 请问怎么实现?谢谢!!
...全文
161 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
sky2050 2005-04-14
  • 打赏
  • 举报
回复
干什么用啊
wealsh 2005-04-14
  • 打赏
  • 举报
回复
float 在哪个单元里啊?
cobi 2005-04-14
  • 打赏
  • 举报
回复
float nowtime,settime;

nowtime := now;
settime := nowtime + 45;

这样处理就可以了,时间在delphi里面表现为一个float型的数字
qi7 2005-04-14
  • 打赏
  • 举报
回复
DateUtils;
function IncMinute(const AValue: TDateTime; const ANumberOfMinutes: Int64 = 1): TDateTime;
gzmhero 2005-04-14
  • 打赏
  • 举报
回复
var
strTime:string;
begin
strTime:='8:05:01';
Label1.Caption:=
FormatDateTime('hh:nn:ss',IncMinute(StrToTime(strTime),45));
cobi 2005-04-14
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
var
nowtime,settime : real;
begin
Nowtime := now;
SetTime := nowtime + 45;
end;

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi Windows SDK/API
社区管理员
  • Windows SDK/API社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧