Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function CMonthWeek(dDate as Date) as String
Select Case Month(dDate)
Case 1
CMonthWeek = "January " & Year(dDate) & " "
Case 2
CMonthWeek = "February " & Year(dDate) & " "
Case 3
CMonthWeek = "March " & Year(dDate) & " "
Case 4
CMonthWeek = "April " & Year(dDate) & " "
Case 5
CMonthWeek = "May " & Year(dDate) & " "
Case 6
CMonthWeek = "June " & Year(dDate) & " "
Case 7
CMonthWeek = "July " & Year(dDate) & " "
Case 8
CMonthWeek = "August " & Year(dDate) & " "
Case 9
CMonthWeek = "September " & Year(dDate) & " "
Case 10
CMonthWeek = "October " & Year(dDate) & " "
Case 11
CMonthWeek = "November " & Year(dDate) & " "
Case 12
CMonthWeek = "December " & Year(dDate) & " "
End Select
CMonthWeek = CMonthWeek & (DatePart("ww", dDate) - DatePart("ww", CDate("1/" & Month(dDate) & "/" & Year(dDate)))
End Function
Public Function FormatMonthWeek(dtDate As Date) As String
Dim FirstDay As Date
Dim PrevSunday As Date
Dim x As Integer
FirstDay = DateSerial(Year(dtDate), Month(dtDate), 1)
PrevSunday = (FirstDay - Weekday(FirstDay)) + 1
x = 0
Do Until PrevSunday > dtDate
PrevSunday = PrevSunday + 7
x = x + 1
Loop
FormatMonthWeek = Format(dtDate, "mmmm yyyy") & " Week " & x
End Function
Format(dDate, "mmmm yyyy") & " Week " & ((DatePart("ww", dDate) + 1) - DatePart("ww", DateSerial(Year(dDate), Month(dDate), 1)))