C#里的时间控件中怎么设置到时分秒

qinzugan 2009-07-30 09:49:39
C#里的时间控件中怎么设置到时分秒?我只能做到年月日,每次都自动调入系统当时时间,我要的是能够选择年月日时分秒,请问有没有什么好的方法,最好只一个控件实现功能.
谢谢.
...全文
2062 16 打赏 收藏 转发到动态 举报
写回复
用AI写文章
16 条回复
切换为时间正序
请发表友善的回复…
发表回复
shishangdere_2007 2009-11-23
  • 打赏
  • 举报
回复
可是这样设完了
只有当前时间显示在框内了
不可变啊
shishangdere_2007 2009-11-23
  • 打赏
  • 举报
回复
可选的怎么办啊
heart_string 2009-08-29
  • 打赏
  • 举报
回复
right
qqiuzaihui 2009-07-30
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 jwdream2008 的回复:]
1.控件的Format属性设置为:Custom
2.控件的CustomFormat属性设置为:yyyy-MM-dd HH:MM:ss
[/Quote]

UP
SQL77 2009-07-30
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 xuecheng1224 的回复:]
设置时间控件的customformat属性为"yyyy-MM-dd HH:mm:ss" ,format属性为"custom",就可以了~

[/Quote]
DATETIMEPICKER 的两个属性,设置一下就好了
sl2161 2009-07-30
  • 打赏
  • 举报
回复
问题不是解决了吗?
jwdream2008 2009-07-30
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 qinzugan 的回复:]
引用 3 楼 jwdream2008 的回复:
1.控件的Format属性设置为:Custom
2.控件的CustomFormat属性设置为:yyyy-MM-dd HH:MM:ss



这样不就是添加两个控件了吗?能说具体一点吗?朋友:)
[/Quote]
对一个时间控件设置这两个属性!
sadikaqy 2009-07-30
  • 打赏
  • 举报
回复
参考:http://www.cnblogs.com/edzjx/archive/2009/04/23/1441756.html
xuecheng1224 2009-07-30
  • 打赏
  • 举报
回复
设置时间控件的customformat属性为"yyyy-MM-dd HH:mm:ss" ,format属性为"custom",就可以了~
三眼 2009-07-30
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 cpp2017 的回复:]
customformat="yyyy-MM-dd HH:mm:ss" format="custom"

[/Quote]
正解
cpp2017 2009-07-30
  • 打赏
  • 举报
回复
这是一个控件的两个属性.
qinzugan 2009-07-30
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 jwdream2008 的回复:]
1.控件的Format属性设置为:Custom
2.控件的CustomFormat属性设置为:yyyy-MM-dd HH:MM:ss

[/Quote]

这样不就是添加两个控件了吗?能说具体一点吗?朋友:)
hecker728 2009-07-30
  • 打赏
  • 举报
回复
在后面加一个时间控件。修改属性Format=Time;  ShowUpDown=true

这两个并排一起就可以达到你要的效果
jwdream2008 2009-07-30
  • 打赏
  • 举报
回复
1.控件的Format属性设置为:Custom
2.控件的CustomFormat属性设置为:yyyy-MM-dd HH:MM:ss
新丁11111 2009-07-30
  • 打赏
  • 举报
回复
关注
cpp2017 2009-07-30
  • 打赏
  • 举报
回复
customformat="yyyy-MM-dd HH:mm:ss" format="custom"

110,561

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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