码迷,mamicode.com
首页 > Web开发 > 详细

asp判断今天是星期几

时间:2018-06-08 15:47:47      阅读:420      评论:0      收藏:0      [点我收藏+]

标签:ediff   ons   case   add   ext   TE   next   diff   his   

<%
yue=month(date())
nian=year(date())
thismon=nian&"-"&yue&"-1"
nextmon=dateadd("m",1,thismon)
tiancount=datediff("d",thismon,nextmon)  ‘本月的天数

wek= weekday(date())
select case wek
case 1
response.write "周日"
case 2
response.write "周一"
case 3
response.write "周二"
case 4
response.write "周三"
case 5
response.write "周四"
case 6
response.write "周五"
case 7
response.write "周六"
end select

yue=month(date())
nian=year(date())
thismon=nian&"-"&yue&"-1"
nextmon=dateadd("m",1,thismon)
tiancount=datediff("d",thismon,nextmon)  ‘本月的天数
dim wek,wekday
wek= weekday(date())
select case wek
case 1
wekday= "周日"
case 2
wekday= "周一"
case 3
wekday= "周二"
case 4
wekday= "周三"
case 5
wekday= "周四"
case 6
wekday= "周五"
case 7
wekday= "周六"
end select

‘response.write "本月共"&tiancount&"天,今天是"&wekday&"
%>

asp判断今天是星期几

标签:ediff   ons   case   add   ext   TE   next   diff   his   

原文地址:https://www.cnblogs.com/ince/p/9155681.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!