Datetime in Where clause.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IamMacro
    New Member
    • Apr 2007
    • 8

    Datetime in Where clause.

    Hi i know this has been asked alot but i couldnt find anything that worked.

    My query looks like this :
    My dates in the SQL CE = "2007-05-11 15:25:40"


    "Select * from table where Workdate='" & dtework & "'"


    Ive tried to use "Like dtework "%" ""

    Now i cant seem to just select on a date "2007/05/11" , Ive been using convert and other things found on the internet.But they all dont seem to select it.

    Do mind im using SQLCE instead of a normal SQL server
  • IamMacro
    New Member
    • Apr 2007
    • 8

    #2
    I tried this and i can get the Date now . but i want the other dates to be the way they are...

    selectcommand.C ommandText = "SELECT convert(nvarcha r(10),datum,101 ),convert(nvarc har(10),beginuu r,100),convert( nvarchar(10),ei nduur,100) from geenwerkdag where datum='" & dtewerk & "'"

    Comment

    Working...