I must be missing something obvious, but how do I determine if the user selected am/pm in the DateTimePicker?
If I use dtPicker.SelectedDate.ToString it returns AM, even if I pick PM.
dtPicker.SelectedDate.SQLDateTime returns 11:00 when I pick PM. Shouldn’t it be 23:00?
I do not see any property on the DateTimePicker control for determining if AM or PM was picked.
Hi @Seth_Tabberer , what OS are you using, please?
Hi @Seth_Tabberer
This is how it looks like here under Win 10.
Here is a screenshot showing the picker showing PM, but the control itself returning AM.
I recommend better to implement the DateChanged
event in the DateTimePicker instance itself, so you receive the DateTime
object with the values selected from the user.
So you can’t read the value out any other time, like when you hit an OK button on the window?
Seems like a bug to me.
1 Like
Yes, it is for the property. I added it to my todos already
2 Likes