DateTimePicker中增减时间的控制

ltolll 2003-10-08 03:12:03
DateTimePicker中当前时间为08:12:50,现要在秒数加20,要求时间变为08:13:10
即DateTimePicker根据增减时间自动计算。
...全文
76 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
fatwave 2003-12-16
  • 打赏
  • 举报
回复
Returns a date/time value shifted by a specified number of seconds.

Unit

DateUtils

Category

date/time routines

extern PACKAGE System::TDateTime __fastcall IncSecond(const System::TDateTime AValue, const__int64 ANumberOfSeconds = 0x000000001);

Description

IncSecond returns the value of the AValue parameter, incremented by ANumberOfSeconds seconds. ANumberOfSeconds can be negative, to return a date and time N seconds prior to AValue.

这是BCB自带的函数!!
yangguo_god 2003-12-15
  • 打赏
  • 举报
回复
TTime time;
time = DateTimePicker1->Time;

TTime time1;
time1 = TTime("00:00:20");
DateTimePicker1->Time = time+time1;
lihongxing2002 2003-12-15
  • 打赏
  • 举报
回复
mark

604

社区成员

发帖
与我相关
我的任务
社区描述
C++ Builder VCL组件使用和开发
社区管理员
  • VCL组件使用和开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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