大致代码
Dim qsrq As Date = new Date(2015, 1, 1)
Dim jsrq As Date = new Date(2015, 12, 31)
Dim tjzq As String '统计周期
Dim ts As TimeSpan = jsrq - qsrq '天数 DateDiff(interval,date1,date2)
If ts.TotalDays <= 30 Then
tjzq = Format(jsrq, "yyyy年MM月")
Else
If ts.TotalDays >= 30 AndAlso ts.TotalDays <= 90 Then
tjzq = jsrq.Year & "年" & math.Ceiling(jsrq.Month / 3) & "季度"
Else
tjzq = jsrq.Year & "年"
End If
End If
msgbox(tjzq)