作者jimshih (传说中的果汁学长)
看板Web_Design
标题Re: [问题] ASP 3.0 取出当日的资料可以这样写吗
时间Thu Feb 16 14:11:57 2006
※ 引述《molucolin (molucolin)》之铭言:
: if Session("Date")=Empty then
: Session("Date")=Date
: end if
: TodayDate=Session("Date")
: sql="Select * from DataBase where DBDate = TodayDate"
: ^^^^^^^^^^^
: 要怎麽改才可以帮当日的资料秀出
: DBDate 是资料库的一个日期栏位
试试这招, 偷吃步法:p
sql = "Select * from DateBase where " & _
"DateDiff(d,DBDate,getdate()) = 0"
不过前提是... 你的资料库要是MS SQL 的..
(Access的我就不晓得行不行得通了)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 220.229.61.172