2
Answers

DateTimePicker

tuortoam

tuortoam

21y
1.9k
1
Hi everyone - I know this has to be straightforward, but I can't figure it out... I have a DateTime value which stores a legitimate date AND time. I have a windows form with two DateTimePicker controls. One is configured to show the date, one is configured to show the time. (dateTimePicker2.format = time; dateTimePicker2.ShowUpDown = true) Once I read the value from the db, I can assign the date to the dateTimePicker1 successfully with the following very simple line: dateTimePicker1.Value = aGame.GameDate; However, when I try to assign the time component to the second control, it doesn't work: dateTimePicker2.Value = aGame.GameDate; The big question: How can I get the time component to display in the DateTimePicker? Thanks in advance.... -Ant
Answers (2)