Solved

Add month to Date time picker VB 2003

Posted on 2006-10-26
4
692 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 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

832 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