Add month to Date time picker VB 2003

How do you add months to the date time picker value?
Say  6months.
TechMonsterAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
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
 
Éric MoreauSenior .Net ConsultantCommented:
Hi TechMonster,

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

Cheers!
0
 
TechMonsterAuthor Commented:
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
 
TechMonsterAuthor Commented:
cool thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.