Can this be done.

Results 1 to 2 of 2

Thread: Can this be done.

  1. #1
    Join Date
    Dec 1969

    Default Can this be done.

    SQL="SELECT CD FROM Store WHERE Purchase_Date LIKE #"&newtime&"%#"<BR>Now here&#039s the problem. My field Purchase_Date is a FULL date/time, meaning 9/18/00 4:45 PM. My newtime field is just a regular short date-9/18/00. I want to select the CD only where the dates match. However being that the two fields are different, I am trying to add a wildcard character (%) to the newtime. But no matter where or how, I try to put it there, it&#039s just not in the right place. Can it be done- a wildcard with a date? What am I missing here?

  2. #2
    Join Date
    Dec 1969

    Default No...but...

    Since you are using Access (you must be, else the #...# wouldn&#039t work at all), you could do:<BR><BR>SQL="SELECT CD FROM Store WHERE DateValue(Purchase_Date) =#"&newtime&"%#"<BR><BR>Use HELP in Access to see available functions, including DateValue.<BR><BR>

Posting Permissions

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