|
|
|
เราจะใช้ Dtpicter ในการหาค่าระหว่างวันที่ได้ยังไงครับ |
|
|
|
|
|
|
|
DTPicker คืออะไรอะครับ
|
|
|
|
|
Date :
2012-02-14 12:58:31 |
By :
13crowns |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ลองดูนะครับ ประยุกต์ใช้เอานะครับ
Dim D1, D2, M1, M2, Y1, Y2, MDY1, MDY2 As String
D1 = DateTimePicker1.Value.Day.ToString
M1 = DateTimePicker1.Value.Month.ToString
Y1 = DateTimePicker1.Value.Year.ToString
MDY1 = M1 & "/" & D1 & "/" & Y1
D2 = DateTimePicker2.Value.Day.ToString
M2 = DateTimePicker2.Value.Month.ToString
Y2 = DateTimePicker2.Value.Year.ToString
MDY2 = M2 & "/" & D2 & "/" & Y2
Dim sd As String = ""
sd = "Select OrderDate,OrderID From Orders"
sd &= " Where OrderDate between '" & MDY1 & "' AND '" & MDY2 & "'"
sd &= " And StatusOrder <> 2 "
|
|
|
|
|
Date :
2012-02-14 15:10:12 |
By :
l3kaing |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 05
|