Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts

    strange problem -- string not being set properly

    i have the following coe

    sql= "select * from items where [expirydate]<CONVERT(datetime, '" & mydate & "', 101)"

    response.write sql


    when i right out the sql it's ignoring everything after [expirydate]
    it's very strange - it's not writing it out or passing it to my query.

    any ideas what could be happening?

  • #2
    Regular Coder
    Join Date
    Jan 2005
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts
    put a space before and after the less than sign
    Code:
    sql= "select * from items where [expirydate] < CONVERT(datetime, '" & mydate & "', 101)"


  •  

    Posting Permissions

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