hello
i have a DTPicker and i want select a query in my database (SQL Server7) in a field date dd/mm/yy How do that?
Printable View
hello
i have a DTPicker and i want select a query in my database (SQL Server7) in a field date dd/mm/yy How do that?
use a variable to hold your query value from the DTPicker:
Then just use the strDate in your query string that you pass to SQL Server:Code:strDate = CStr(DTPicker1.Day) & "/" & CStr(DTPicker1.Month) & "/" & CStr(DTPicker1.Year)
Code:strSQL = "Select * From table Where datefield='" & strDate & "'"