|
|
||||
首页
文学作品 网页设计 平面设计 程序设计 考试认证 基础办公 QQ资源 服务器架设 网站运营 网页资源
|
|
|
| 汉南在线 → 网页设计 → Asp动态程序 | |||||||||||
<% today="#"&year(now())&"-"&month(now())&"-"&day(now())&"#" yestoday="#"&year(dateadd("d",now(),-1))&"-"&month(dateadd("d",now(),-1))&"-"&day(dateadd("d",now(),-1))&"#" 'sqltoday="select sum(totalnum) as nums,sum(totalprice) as prices from [records] where state=1 and addtime >= "&today 'sqlyestoday="select sum(totalnum) as nums,sum(totalprice) as prices from [records] where state=1 and addtime >= "&yestoday&" and addtime < "&today thismonthstart="#"&year(now())&"-"&month(now())&"-01#" thismonthend="#"&year(dateadd("d",now(),-1))&"-"&month(dateadd("d",now(),-1))&"-"&datepart("d",dateadd("d",-1,dateadd("m",1,dateadd("d",-datepart("d",now())+1,now()))))&"#" lastmonthstart="#"&year(dateadd("m",-1,now()))&"-"&month(dateadd("m",-1,now()))&"-01#" lastmonthend="#"&year(dateadd("d",dateadd("m",-1,now()),-1))&"-"&month(dateadd("d",dateadd("m",-1,now()),-1))&"-"&datepart("d",dateadd("d",-1,dateadd("m",1,dateadd("d",-datepart("d",dateadd("m",-1,now()))+1,dateadd("m",-1,now())))))&"#" 'sqlmonth="select sum(totalnum) as nums,sum(totalprice) as prices from [records] where state=1 and addtime >= "&thismonthstart&" and addtime <= "&thismonthend 'sqllastmonth="select sum(totalnum) as nums,sum(totalprice) as prices from [records] where state=1 and addtime >= "&lastmonthstart&" and addtime <= "&lastmonthend 'set rs=conn.execute(sqltoday) 'set rsn=conn.execute(sqlyestoday) 'set rsm=conn.execute(sqlmonth) 'set rsl=conn.execute(sqllastmonth) response.write today&"<br>" response.write yestoday&"<br>" response.write thismonthstart&"<br>" response.write thismonthend&"<br>" response.write lastmonthstart&"<br>" response.write lastmonthend&"<br>" %>
| |||||||||||
| >> 相关文章 | |||||||||||
|
授权使用:汉南在线 http://hnzx.hzwz.net/ 经营许可证:陕ICP备05000109号 Powered by:汉南在线 Copyright (c) 2002-2007 汉南在线. All Rights Reserved . |