→ Growi:如果是用SQLDATASOURCE的話用圖形介面 在變數那邊指定控制項 10/27 21:23
→ Growi:用圖形介面很容易可以達到你要的功能~一步步照著做 先寫好 10/27 21:24
→ Growi:sql command (WHERE date>=@Date1 and date<=@Date2) 10/27 21:25
→ Growi:@Date1 在指定變數的時候指到txtbox1 @Date2指到txtbox2 10/27 21:26
→ moneylove:不好意思,忘了說我是想要"搜尋鈕按下去"才跑這一個功能 10/27 21:30
推 Deadshot465:嗯呃 資料型態好像不太一樣吧? 10/28 03:58
→ Deadshot465:一個是DateTime 一個是string 10/28 03:58
→ Deadshot465:此外SQL Server中DateTime的顯示方式為何其實沒甚麼差 10/28 03:59
→ Deadshot465:DateTime就是DateTime LongString和ShortString是轉成 10/28 03:59
→ Deadshot465:字串才有差異的吧... 10/28 03:59
→ Deadshot465:所以看看能不能先DateTime.Parse或DateTime.TryParse 10/28 04:00
→ Deadshot465:然後推G大說的方法 用參數比較好 10/28 04:01
→ Autumn740317:請用convert(varchar,date_time,111)轉碼再加條件 11/05 08:38
→ Autumn740317:否則妳的begin&end同一天的話,只會顯視該天的 11/05 08:40
→ Autumn740317:00:00:00的資料 11/05 08:40