Solved

Add month to Date time picker VB 2003

Posted on 2006-10-26
4
706 Views
Last Modified: 2010-08-05
How do you add months to the date time picker value?
Say  6months.
0
Comment
Question by:TechMonster
[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
  • 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 500 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

626 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