Private Sub DTPicker1_Click()
Text1.Text = DTPicker1.Value ‘To get the date
Text2.Text = DTPicker1.Day ‘To get the Day
Text3.Text = DTPicker1.Month ‘To get the Month
Text4.Text = DTPicker1.Year ‘ To get the Year
Text5.Text = DTPicker1.DayOfWeek ‘ To get the Day of the Week
Text6.Text = Format(DTPicker1.Value, “DD-MM-YYYY”, vbSunday, vbFirstFullWeek) ‘To set the date format as required
Text7.Text = DateAdd(“d”, 10, “01/02/2001″) ‘ To add 10 days to the given date
Text8.Text = DateAdd(“m”, 10, “01/02/2001″) ‘To add 10 months to the given date
Text9.Text = DateAdd(“yyyy”, 10, “01/02/2001″) ‘To add 10 years to the given date
Text10.Text = DateDiff(“d”, “01/05/2001″, “01/30/2001″) ‘To find the number of days between any two dates
End Sub
NICE CODING, BUT THERE IS MISSING TO FIND OUT THE WEEK OF ANY YEAR AND HOW TO ADD ONE WEEK IN A PARTICULAR DAY.
If I created 2 DTPicker and I want to minus it.
So 3 – 1 = 2 (DTPicker1 – DTPicker2 = Total Date)
The question: How can I do the coding.
Help me please
I do on VB6