Results 1 to 2 of 2

Thread: Where statement with Date()

  1. #1
    Kim Richardson Guest

    Where statement with Date()

    Hello Gentlemen,

    I need a were statement that looks for records >= today's date. This Where statement works fine...

    Where cAffNo='TXMB01' and (cDOF>=#5/1/99# or cDOF=Null)

    When I try to replace the 5/1/99 with Date(), it doesn't work. I have tried 'Date()', [Date()],#Date()# and several other ways.

    Can you tell me what I am missing?

    Thanks as always,

    Kim

  2. #2
    John Guest

    Where statement with Date() (reply)

    You're probably forgetting to quote the string properly. For example

    WHR = &#34;WHERE myDateFld < #12/1/99#&#34;

    would look like this:

    WHR = &#34;WHERE myDateFld < #&#34; & Date() & &#34;#&#34;

    Hope this helps!
    John


    ------------
    Kim Richardson at 5/13/99 12:52:30 PM

    Hello Gentlemen,

    I need a were statement that looks for records >= today&#39;s date. This Where statement works fine...

    Where cAffNo=&#39;TXMB01&#39; and (cDOF>=#5/1/99# or cDOF=Null)

    When I try to replace the 5/1/99 with Date(), it doesn&#39;t work. I have tried &#39;Date()&#39;, [Date()],#Date()# and several other ways.

    Can you tell me what I am missing?

    Thanks as always,

    Kim

Posting Permissions

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