Serious problem with "date"

Results 1 to 3 of 3

Thread: Serious problem with "date"

  1. #1
    Norman-Sebastian Rieger Guest

    Default Serious problem with "date"

    Hi all..<BR>well, i´ve got a serious problem -for a beginner, everything is serious you know *g*-with a date in a database. I´ll just post the code and the error message..ok?<BR>&#060;%<BR>Set Connect = Server.CreateObject("ADODB.Connection")<BR>Connect .Open sqldatabase<BR>Set content = Connect.Execute(_<BR> "Select * FROM atable WHERE dateoffdeletion = " & "23.05.2001")<BR>%&#062;<BR><BR>The error i get is a Syntaxerror regarding: &#039;dateoffdeletion = 23.05.2001&#039;<BR><BR>What can I do to solve this problem? I already tried things like &#039; or # (e.g. #23.05.2001#) but it didn´t help out.<BR>For people who´re interested in my computer<BR>I use windows 2000 pro sp2. I also get the error when I upload the files onto my webspace which is using nt4<BR>does anyone have a solution?<BR><BR>

  2. #2
    ed holzinger Guest

    Default RE: Serious problem with

    Dates in sql have to be queried with single quotes:<BR><BR>Select * from atable where dateoffdeletion=&#039;5/23/01&#039;<BR><BR>

  3. #3
    Eddie Campbell Guest

    Default Unless the Db is Access

    In which case you need to # marks.<BR><BR>I&#039;d try and use / instead of . to separate your dates

Posting Permissions

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