Is there a way to increment a datetimepicker's value by 2 hours? I have it set to time only.

Recommended Answers

All 5 Replies

Merovingian,

Can you be more specific? Show us your code if any.

Drag a DateTimePicker to your windows form. Set it's 'Format' property to 'Time'.

Now when you run your app the DateTimePicker's value is the current time. How do you change it's value to Now + 2 hours?

DateTimePicker1.Value = Now.AddHours(2)

Sometimes it's so simple you over think it. Thanks TomW!!

Anytime... :)

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.