ssalomon
New member
Hope someone can help me Please
Hi I am tray to get data from database
I am tray to select Status of record then search string then day from and day to
but this dont work
Date format in Database mysql = 0000-00-00
Dim dtStart As Date
Dim dtEnd As Date
dtStart = CDate(DateTimePicker1.Text)
dtEnd = CDate(DateTimePicker2.Text)
RS.Open("SELECT * FROM orderstatus WHERE OrderStatus= '" & Trim(Cbo_search_status.Text) & "' AND CustomerName = '" & Trim(TextBox1.Text) & "' AND OrderDate Between #" & Month(dtStart) & "/" & DateValue(dtStart) & "/" & Year(dtStart) & "# AND #" & Month(dtEnd) & "/" & DateValue(dtEnd) & "/" & Year(dtEnd) & "#", conn)
Hi I am tray to get data from database
I am tray to select Status of record then search string then day from and day to
but this dont work
Date format in Database mysql = 0000-00-00
Dim dtStart As Date
Dim dtEnd As Date
dtStart = CDate(DateTimePicker1.Text)
dtEnd = CDate(DateTimePicker2.Text)
RS.Open("SELECT * FROM orderstatus WHERE OrderStatus= '" & Trim(Cbo_search_status.Text) & "' AND CustomerName = '" & Trim(TextBox1.Text) & "' AND OrderDate Between #" & Month(dtStart) & "/" & DateValue(dtStart) & "/" & Year(dtStart) & "# AND #" & Month(dtEnd) & "/" & DateValue(dtEnd) & "/" & Year(dtEnd) & "#", conn)