?
Solved

Help me about DateTimePicker

Posted on 2006-11-18
8
Medium Priority
?
285 Views
Last Modified: 2010-04-16
How to plus more day to DateTimePicker current
0
Comment
Question by:free4vn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
8 Comments
 
LVL 9

Expert Comment

by:DrAske
ID: 17971050
could you please explain what you want to do exactly??
becuase the DateTimePicker has already this functionality!! Just place a DateTimePicker on a form and focus the date portion and it will role up or down on up down keys. Same is true for month/years ..
0
 
LVL 15

Expert Comment

by:ozymandias
ID: 17971114
DateTime d = DateTimePicker.Value;
d.AddDays(1d);
DateTimePicker.Value = d;
0
 
LVL 48

Accepted Solution

by:
AlexFM earned 252 total points
ID: 17971116
dateTimePicker1.Value = dateTimePicker1.Value.AddDays(1);
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 15

Expert Comment

by:ozymandias
ID: 17971162
Yes, or as AlexFM shows yoiu can do it as a single line of code...I was just trying to break it down.
0
 
LVL 48

Expert Comment

by:AlexFM
ID: 17971342
Actually, DateTime.AddDays returns DateTime and doesn't change current instance, so you version should be changed.
0
 
LVL 15

Assisted Solution

by:ozymandias
ozymandias earned 248 total points
ID: 17971407
Yes, sorry that should have been :

DateTime d = DateTimePicker.Value;
DateTimePicker.Value = d.AddDays(1d);
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question