Riya
Riya

Reputation: 559

How can I set a DateTimePicker value as today's date+1

How can I set a DateTimePicker value as today's date+1 in code?

Upvotes: 5

Views: 14729

Answers (5)

Alexander Zaldostanov
Alexander Zaldostanov

Reputation: 3011

you can say like DateTime.Today.AddDays(1)

Upvotes: 0

Kris Ivanov
Kris Ivanov

Reputation: 10598

var myDate = DateTime.Now.AddDays(1);

should do it

Upvotes: 2

Anuraj
Anuraj

Reputation: 19618

Try this

this.dateTimePicker1.Value = DateTime.Now.AddDays(1);

Upvotes: 3

Notter
Notter

Reputation: 588

set it's selected date to a Datetime.Now.AddDays(1);

Upvotes: 1

detroitpro
detroitpro

Reputation: 3913

Can you pass the binding/context/value as : DateTime.Now.AddDays(1);

Upvotes: 5

Related Questions