I'm letting users select a date/time for a scheduled task to run, using two NumericUpDown
controls.
I'd like one-digit values to be padded with a leading 0, so as to display 09:00
instead of 9:0
.
The definitive solution is to use a DateTimePicker
with ShowUpDown
set to True
and Format
set to Time
or Custom
. In the latter case, you'd use hh:mm
or HH:mm
as a custom format.