I need to complete this function
Function WeekOfMonth(ByVal datDate As Date) As String
WeekOfMonth = "Week " & DatePart("ww", datDate) - _
DatePart("ww", Month(datDate) & _
"/1/" & Year(datDate)) + 1
End Function
(thanks vbslammer)
This function gives me the week of a particular month. However, if the week ends in a different month, it gives me week 1 of that month rather than week 5 or 6 from the current month. For instance, at the end of the last october i need 10/27-10/31 to show as week 5 of october rather than week 1 of November. I will be forever indebted to the person that helps.
![[cannon] [cannon] [cannon]](/data/assets/smilies/cannon.gif)
![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)
[flush]
Function WeekOfMonth(ByVal datDate As Date) As String
WeekOfMonth = "Week " & DatePart("ww", datDate) - _
DatePart("ww", Month(datDate) & _
"/1/" & Year(datDate)) + 1
End Function
(thanks vbslammer)
This function gives me the week of a particular month. However, if the week ends in a different month, it gives me week 1 of that month rather than week 5 or 6 from the current month. For instance, at the end of the last october i need 10/27-10/31 to show as week 5 of october rather than week 1 of November. I will be forever indebted to the person that helps.
![[cannon] [cannon] [cannon]](/data/assets/smilies/cannon.gif)
![[machinegun] [machinegun] [machinegun]](/data/assets/smilies/machinegun.gif)
![[auto] [auto] [auto]](/data/assets/smilies/auto.gif)