在ASP.NET中查询一段时间到另一段时间的所有信息,这个SQL语句怎么写 button的click事件又该怎么去写
答案:3 悬赏:10
解决时间 2021-02-22 11:13
- 提问者网友:冰点阿弟
- 2021-02-21 22:16
我想问一下,在ASP.NET中查询一段时间到另一段时间的所有信息,这个SQL语句怎么写 button的click事件又该怎么去写呢,请教高人指点,我的表名是CateGries 我这个表字段是CateId CateName CateAddress CateClick PublishTime EndTime 两个时间字段名是PublishTime 和 EndTime 谢谢指点
最佳答案
- 二级知识专家网友:湫止没有不同
- 2021-02-21 22:54
between 也行。
简单的就直接取时间段也行。
你没说明白是什么语言编写,我就用VB来了。
事件是把控件拉出来双击就转换到点击事件里了。
select * from GateGries where PublishTime = textbox1 and endtime = textbox2
textbox 是你输入时间段的输入框。
简单的就直接取时间段也行。
你没说明白是什么语言编写,我就用VB来了。
事件是把控件拉出来双击就转换到点击事件里了。
select * from GateGries where PublishTime = textbox1 and endtime = textbox2
textbox 是你输入时间段的输入框。
全部回答
- 1楼网友:堕落奶泡
- 2021-02-22 01:45
select * from GateGries where PublishTime between(thebegintime,theendtime) or endtime between(thebegintime,theendtime)
其中thebegintime和theendtime是你要设置的两个起止时间段, 具体的时间写法请参照你的数据库和你的PublishTime及EndTime字段
- 2楼网友:蜜罐小熊
- 2021-02-22 00:10
晕 这个是要把 .designer文件中要有
this.btstart.location = new system.drawing.point(197, 73);
this.btstart.name = "button1";
this.btstart.size = new system.drawing.size(75, 23);
this.btstart.tabindex = 0;
this.btstart.text = "button1";
this.btstart.usevisualstylebackcolor = true;
this.btstart.click += new system.eventhandler(this.btstart_click);
private system.windows.forms.button btstart;
这样的代码的
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯