Re: [問題] ASP 3.0 取出當日的資料可以這樣寫嗎

看板Web_Design作者 (傳說中的果汁學長)時間20年前 (2006/02/16 14:06), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
※ 引述《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
文章代碼(AID): #13z1Pvy7 (Web_Design)
文章代碼(AID): #13z1Pvy7 (Web_Design)