最近公司要我做ASP可是我不什么懂.现在遇到一个请大虾帮忙一下:
在ASP中如何取本月的最后一天,如我要选择条件2006年11月BeginDate= Request("Year") & "-" &Request("Month") & "-" & "01":起始日期BeginDate???????:结束日期改什么写
因为后台的过程SQL过滤条件为: BeginDate<=DATE<=BeginDate
在ASP中如何取本月的最后一天,如我要选择条件2006年11月BeginDate= Request("Year") & "-" &Request("Month") & "-" & "01":起始日期BeginDate???????:结束日期改什么写
因为后台的过程SQL过滤条件为: BeginDate<=DATE<=BeginDate
解决方案 »
- aspx页面文件中,头部Inherits属性的作用是什么啊
- 新手求助,请指点一个3级的示例,需要从数据库里面提数据
- 怎么在自己网站插入六合彩的开奖结果
- 播放器的问题
- aspx中回调的问题
- 异常详细信息: System.FormatException: 输入字符串的格式不正确?
- 系统分析师 都来看看 有钱啦
- ASP.NET html服务器控件button单击事件被触发两次的问题
- asp.net c# 与 javascrip 如何互传数据?
- 请问一个比较菜的问题,怎样看Asp.net里面类的原码?
- 为什么带Codebehind的运行不起来?
- 请问各位,CSDN首页上的那个会从1到6变化的广告是用什么写的?给点思路
看看这个会对你有帮助
到asp版面问问
Dim dm As Date
Dim m As Integer
dm = dFirst
m = Month(dm)
Do While Month(dm) = m
dm = dm + 1
Loop
MonLastDay = dm - 1
End Function
下面是由ACCESS中国的李啸林版主提供:Public Function MonLastDay1(dFirst As Date) As Date
MonLastDay1 = DateAdd("d", -1, CDate(DatePart("yyyy", DateAdd("m", 1, dFirst)) & _
"-" & DatePart("m", DateAdd("m", 1, dFirst))))
End Function
下面是由ACCESS中国的AlexLiu提供:Public Function MonLastDay1(dFirst As Date) As Date
MonLastDay1 = DateSerial(Year(dFirst), Month(dFirst) + 1, 1) - 1
End Function 转自网络,没有验证。
接分
{
int iYear = DateTime.Now.Year;
//得到此月的月份信息;
int iMonth = DateTime.Now.Month;
//得到此月的天数信息;
int daysOfMonth = DateTime.DaysInMonth(iYear,iMonth);
//得到当月的最后一天;
string endDate = Convert.ToString(iYear) +"-"+ Convert.ToString(iMonth)+"-"+ Convert.ToString(daysOfMonth);
return endDate;
}