Skip to Content
author's profile photo Former Member
Former Member

Query Generator/Variables

In Query Generator I need to prompt for dates using [%0] and [%1]. However, I get an error once I input dates. Do the query variables come in as string format and if so, how do I compare a date input

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 17, 2005 at 10:07 PM

    I'm not a specialist on this, but I have to learn this for the Certification exam. So, I played with Queries and noticed that the date format is driven by the Date format parameter in Administration - General settings - Display.

    I tried the following query:

    SELECT CardCode, UpdateDate FROM OCRD T0 WHERE T0.UpdateDate >= '[%1]' ORDER BY T0.UpdateDate

    When the date format is CCYY-MM-DD it works with 2003-11-31 and 03-11-31 and 03.11.31.

    When the date format is set to DD.MM.YYYY the query runs OK with 31.12.02.

    HTH

    Juha

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.