Is there any way to format the datetimepicker so that it only shows hourly intervals? I already put it so it only shows time... And when I try dtmPicker.CustomFormat = "HH" it doesnt work. I want the user to only be able to pick from hourly intervals without having to load them into a combobox individually.

Recommended Answers

All 3 Replies

You have to set first datetimepicker's format property to 'Custom' like this:

dtmPicker.Format = DateTimePickerFormat.Custom
dtmPicker.CustomFormat = "HH"

HTH

Agreed with Teme64. You can try it.

commented: Try posting something original instead of trying to get points for someone else's solution. -3

Genius. +1

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.