PDA

Click to See Complete Forum and Search --> : help"


farizza
Oct 27th, 2000, 01:20 PM
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?

monte96
Oct 28th, 2000, 11:59 PM
use a variable to hold your query value from the DTPicker:


strDate = CStr(DTPicker1.Day) & "/" & CStr(DTPicker1.Month) & "/" & CStr(DTPicker1.Year)


Then just use the strDate in your query string that you pass to SQL Server:


strSQL = "Select * From table Where datefield='" & strDate & "'"