ASP获得上月、本月、下月的第一和最后一天
代码如下:
'上个月第一天: <%=dateadd("m",-1,year(date)&"-"&month(date)&"-1")%> '上个月最后一天: <%=dateadd("d",-1,year(date)&"-"&month(date)&"-1")%> '本月第一天: <%=year(date)&"-"&month(date)&"-1"%> 本月最后一天: <%=dateadd("d",-1,dateadd("m",1,year(date)&"-"&month(date)&"-1"))%> '下个月第一天: <%=dateadd("m",1,year(date)&"-"&month(date)&"-01")%> '下个月最后一天: <%=dateadd("d",-1,dateadd("m",2,year(date)&"-"&month(date)&"-01"))%> |