Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Add month to Date time picker VB 2003

Posted on 2006-10-26
4
Medium Priority
?
708 Views
Last Modified: 2010-08-05
How do you add months to the date time picker value?
Say  6months.
0
Comment
Question by:TechMonster
  • 2
  • 2
4 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 17813161
Hi TechMonster,

DateTimePicker1.Value = DateTimePicker1.Value.AddMonths(6)

Cheers!
0
 

Author Comment

by:TechMonster
ID: 17813415
yep that was it...would it be too much to ask if you can minus a "buisness day" from the date..

So if today was monday the 23 the date time picker would show Friday 20.
and if it was Tueday the 24, it would show Monday the 23?

I have increased the pionts>>>
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 17813651
TechMonster,

        Do While True
            DateTimePicker1.Value = DateTimePicker1.Value.AddDays(-1)
            If Not ((DateTimePicker1.Value.DayOfWeek = DayOfWeek.Saturday OrElse DateTimePicker1.Value.DayOfWeek = DayOfWeek.Sunday)) Then Exit Do
        Loop
0
 

Author Comment

by:TechMonster
ID: 17813741
cool thanks
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

971 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