时间区间计算尽量用日期函数
如:
Dim d As Date = Format(Date.Today,"yyyy-MM-1")Dim dt As Date = Format(d.AddDays(-1),"yyyy-MM-dd 23:59:59") '上月的最后一天Dim dt1 As Date = d.AddMonths(-1) '上月的第一天
Output.show(dt)