Results 1 to 2 of 2

Thread: help"

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Oct 2000
    Location
    Panama
    Posts
    17

    Wink

    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?

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    use a variable to hold your query value from the DTPicker:

    Code:
    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:

    Code:
    strSQL = "Select * From table Where datefield='" & strDate & "'"
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    monte96_@hotmail.com
    monte96@vbgarage.com


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width