Results 1 to 5 of 5
  1. #1
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date Retrieval (A2K)

    Simple Date Scenario in Query

    Field Name: F00_FunctionDate
    Format: Medium Date

    Search Criteria: Like "*" & [Enter Date ] & "*"

    Returns no records although they exist.


    Tried:

    Field Name: TheDate: DateValue([F00_FunctionDate])
    Format: Medium Date

    Search Criteria: Like "*" & [Enter Date ] & "*"

    Response: The expression is typed incorrectly or too complex, etc.

    What are my feeble eyes missing.

    And is it possible to have a "Greater Than" Version?

    Thanks in advance for any help on this one,
    Cheers,
    Andy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Date Retrieval (A2K)

    If you want 'equal to', use

    [Enter Date]

    If you want 'greater than', use

    >[Enter Date]

    With a date value, it's not immediately clear what you would want to accomplish with Like. A date is not a string.

  3. #3
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Retrieval (A2K)

    Albeit a logical answer on your part and a good question with respect to the use of "Like", I've achieved the following results by attempting to "simplify" the "simple".


    Field Name: F00_FunctionDate
    No formatting:
    When displayed, looks like: 5/28/2008 3:39:25 PM

    Used: [Enter Date] as criteria
    Entered Parameter Value: 5/28/2008
    Result: No Match

    Tried:

    Field Name: TheDate: DateValue([F00_FunctionDate])
    Format: Medium Date and without Medium Date
    When displayed, looks like: 5/28/2008
    Used: [Enter Date] as criteria
    Entered Parameter Value: 5/28/2008

    Response: The expression is typed incorrectly or too complex, etc.

    I think I need to find a good optometrist.
    Cheers,
    Andy

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Date Retrieval (A2K)

    What happens if you use Int([F00_FunctionDate]) instead of DateValue(...) ?

  5. #5
    5 Star Lounger
    Join Date
    Nov 2001
    Location
    Toronto Canada
    Posts
    920
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Retrieval (A2K)

    What happens is that it works Perfectly! <img src=/S/joy.gif border=0 alt=joy width=23 height=23>

    I picked up the DateValue scenario from a previous post, but unfortunately it didn't work in this instance.

    Thanks again, Hans
    Cheers,
    Andy

Posting Permissions

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