Register  |  Login   
Monday, February 08, 2010   

Category

Rave - General

Question

    How do I get a Date Range using Parameters, when using Driver DataLinks inside the Rave IDE?

Solution

    Sadly, the processing of Dates (and Times and TimeStamps) differ between the various Database Engines. Following is how to select all the dates in 2003 for some of the different Engines.

    MS SQL Server via ADO

    Query Property:

    Select
    T1.*
    From
    Table1 T1
    Where
    (T1.InvDate = ':StartDate') and (T1.InvDate <= ':EndDate')

    QueryParams Property:

    Note: US Format Dates Required.

    startdate = param.startdate('01/01/2003')
    enddate = param.enddate('12/31/2003')

    MS Access via ADO

    Query Property:

    Select
    T1.*
    From
    Table1 T1
    Where
    (T1.InvDate = #:StartDate#) and (T1.InvDate <= #:EndDate#)

    QueryParams Property:

    Note: US Format Dates Required.

    startdate = param.startdate('01/01/2003')
    enddate = param.enddate('12/31/2003')

Tip created by Glenn Crouch - Email : glenn@esbconsult.com - Web : http://www.esbconsult.com

Date Created: 8/6/2003 7:20:26 PM - Date Last Updated: 8/6/2003 7:20:26 PM