i have a text box, control botton and a datetime picker i want that if i write 2 in textbox and press button then datetimepicker auto change the current date and add 2 days in it . i am doing it in c#.net

Recommended Answers

All 3 Replies

Is this what you are looking for: dateTimePicker.Value.AddDays(2.0);

Use this:
dateTimePicker1.Value = dateTimePicker1.Value.AddDays(2.0);

thx it works.

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.