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

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

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

HTH

Jump to Post

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 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.