注册 登录
编程论坛 ASP技术论坛

求教关于时间跳转的问题

xenoiter 发布于 2007-08-29 16:55, 380 次点击
if query="yes" then
y=request.Form("y")
m=request.Form("m")
else
y=request.querystring("y")
m=request.querystring("m")
d=request.querystring("d")
end if
if y="" then
y=year(date)
end if
if m="" then
m=month(date)
end if
if d="" then
d=day(date)
end if
call blogdate(y,m,d)
'=====================以年月日为参数的显示==============================================
sub blogdate(y,m,d) '
str1=" 当前:"&y&"年"&m&"月 " '得到当前日期的年月日
nowdate=y&"-"&m&"-"&d
lastdate=dateadd("m",+1,nowdate)
lasty=year(lastdate)
lastm=month(lastdate)
nextdate=dateadd("m",+1,nowdate)
nexty=year(nextdate)
nextm=month(nextdate)
thismonth=y&"-"&m&"-1" '当前月的第一天
nextmonth=dateadd("m",+1,thismonth) '下个月的第一天
num=datediff("d",thismonth,nextmonth) '当前月的天数
firstday=weekday(thismonth)-1 '得到当前月第一天的星期
3 回复
#2
xenoiter2007-08-29 16:56
怎么当月大于12的时候自动年变成下一年!现在是十二月以后的不可以打开,和二月前也不能打开
#3
multiple19O22007-08-29 16:58
月份数不是不可能大于12吗?
#4
xenoiter2007-08-30 08:39

是的但是不知道从那里修改一下

1