Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的代码:
dateTimePicker1.ShowUpDown = true; dateTimePicker1.CustomFormat = "HH:MM"; dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
嗨,我使用自定义格式, dateTimePicker直到不显示第二个,但它的格式在 dateTimePicker 中隐藏 AM/PM 如何以这种格式显示 AM/PM
dateTimePicker
只需添加tt.AM/PM
tt
AM/PM
dateTimePicker1.CustomFormat = "HH:mm tt"
它应该是mm几分钟。
mm