入题其年份为任意一年

解决方案 »

  1.   

    用weekday函数得到给定年份1月1号是星期几,再通过你设定的每周第一天是星期几得出给定年份第一周的第一天是几月几号,然后用你当前的日期-得到的日期可以得到相隔多少天再/7就是你要的了
      

  2.   

    Dim i As Integer
        Dim strYear As String, strDate As String
        strDate = "8-12"
        strYear = "2005"
        i = DateDiff("w", strYear & "-1-1", strYear & "-" & strDate)
      

  3.   

    MsgBox DateDiff("d", CDate(Year(Date) & "-01-01"), Date) \ 7