想用两个DateTimePicker1,DateTimePicker2一个显示年月日,另一个是十分秒,可是数据库中又是一个字段,如何把两个组合到一起啊,库中字段为DATETIME的,谢谢???
解决方案 »
- 用Delphi实现论坛灌水机的源码不能调试通过
- 更新数据后如何定位或保持原来的顺序,数据源是一个查询(视图),如何实现?
- 如要在程序运行时激活一个butten.chick事件,这个在要哪个控件里加载
- 关于动态创建组件的问题?、/
- 上海程序员的薪水
- 在MDI里,怎么使两个子窗体不能同时打开?
- 三层 多主健检查合法性
- 想写个Component,以TComponent为基础,Install时,“program or unit 'TTst.pas' Recursively uses itself”
- 问了3天,却没有人看一眼的问题
- fastReport导出excel问题
- 我只会用ADOquery,不会用Dataset,有没有Dataset的教程啊!
- MDA for Delphi
T : TDateTime;
T:=StrToDateTime(FormatdateTime('yyyy-mm-dd',DateTimePicker1.DateTime)+FormatdateTime('HH:MM:SS',DateTimePicker1.DateTime))
T就是完整的时间了
,DateTimePicker1.DateTime := StrToDateTime('2005-09-09')
DateTimePicker2.DateTime := StrToDateTime('2005-09-09 00:00:00')
应该就可以了.
T : TDateTime;
T:=StrToDateTime(FormatdateTime('yyyy-mm-dd',DateTimePicker1.DateTime)+FormatdateTime('HH:MM:SS',DateTimePicker1.DateTime))
T就是完整的时间了
也可以
DateTimePicker1=now;
用StrtoDateTime依赖于系统的时间日期格式设置。