Hello !
I want to get the current week number of the month. I have used this code below : -
Private Sub Command1_Click()
Dim t_Day As Double
t_Day = Day(DTPicker1.Value)
Select Case t_Day
Case 1, 2, 3, 4, 5, 6, 7, 8
Text1.Text = "1st Week"
Case 9, 10, 11, 12, 13, 14, 15, 16
Text1.Text = "2nd Week"
Case 17, 18, 19, 20, 21, 22, 23, 24
Text1.Text = "3rd Week"
Case 25, 26, 27, 28, 29
Text1.Text = "4th Week"
Case 30, 31
Text1.Text = "5th Week"
End Select
End Sub
This does not return always true result. Any better code for this ????