PROBLEM - Selecting records based on Date Range 
Author Message
 PROBLEM - Selecting records based on Date Range

Question :
Is there a Problem with using the Date Function when the "to Date" of the
date range is the Current Date? ( I tested the CurrentDate function and it
also failed)

I am currently using Crystal Reports ver 6.0 VB5 and SQL Server 7.

In VB , I am dynamically creating a Selection formula which includes the
users selected "Start" and  "End"  dates as follows:

{Scrap.Dt_Entered} in Date (1999, 04, 01) to Date (1999, 05, 03)

Even though records do exist within this range, none are displayed. (May 3,
by the way, was the current date)

Now try to follow me:

1. Using  select expert I created a formula as follows: {Scrap.Dt_Entered}
in Date (1999, 04, 07) to Date (1999, 05, 03) - This one worked. Notice the
start date is April  7,1999 - it is a record that exists in the table. I
selected the first date in the combo selection box which has a list of all
the existing values for {Scrap.Dt_Entered}. There are  no records for April
1, 1999,  which was the "Start" date I originally tried to use.

2. The problem seems to be related to TODAYS DATE (MAY 3,1999 for example).
When I change the  formula to {Scrap.Dt_Entered} in Date (1999, 04, 01) to
Date (1999, 05, 02) or {Scrap.Dt_Entered} in Date (1999, 04, 07) to Date
(1999, 05, 04) , all the records are selected -    ALMOST . The only records
that do not get selected are the records that fall on the "to Date" (so I
have to add a day to the "To Date") . (This latter problem is revealed in
the Crystal Knowledge Base)

Thanks in advance for your assistance.

Yours kindly,

Enzo



Sat, 20 Oct 2001 03:00:00 GMT  
 PROBLEM - Selecting records based on Date Range
Why not use something like:


Be sure to define the parameter fields start_date and end_date as date
types.

 Sincerely,

Craig Buchanan, President
Cogniza, Inc.
Seagate Software Partner
http://www.cogniza.com

+1.612.824.5858

Quote:

>Question :
>Is there a Problem with using the Date Function when the "to Date" of the
>date range is the Current Date? ( I tested the CurrentDate function and it
>also failed)

>I am currently using crystal reports ver 6.0 VB5 and SQL Server 7.

>In VB , I am dynamically creating a Selection formula which includes the
>users selected "Start" and  "End"  dates as follows:

>{Scrap.Dt_Entered} in Date (1999, 04, 01) to Date (1999, 05, 03)

>Even though records do exist within this range, none are displayed. (May 3,
>by the way, was the current date)

>Now try to follow me:

>1. Using  select expert I created a formula as follows: {Scrap.Dt_Entered}
>in Date (1999, 04, 07) to Date (1999, 05, 03) - This one worked. Notice the
>start date is April  7,1999 - it is a record that exists in the table. I
>selected the first date in the combo selection box which has a list of all
>the existing values for {Scrap.Dt_Entered}. There are  no records for April
>1, 1999,  which was the "Start" date I originally tried to use.

>2. The problem seems to be related to TODAYS DATE (MAY 3,1999 for example).
>When I change the  formula to {Scrap.Dt_Entered} in Date (1999, 04, 01) to
>Date (1999, 05, 02) or {Scrap.Dt_Entered} in Date (1999, 04, 07) to Date
>(1999, 05, 04) , all the records are selected -    ALMOST . The only
records
>that do not get selected are the records that fall on the "to Date" (so I
>have to add a day to the "To Date") . (This latter problem is revealed in
>the Crystal Knowledge Base)

>Thanks in advance for your assistance.

>Yours kindly,

>Enzo



Sun, 21 Oct 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Crystal Reports 8.5 date range parameter field - record selection that includes null date range

2. How to select a range of date record from SQL server

3. Selecting records within date range

4. How to select a range of date record from SQL server

5. Selecting Access records in date range

6. How to select a range of date record from SQL server

7. SQL statment problem with selecting date range

8. Cetting A Report To Select Records Based Upon A Value Selected In A Combo Box

9. Problem accessing record from SQL Data base Date/Time Field

10. Report based on date range

11. Calling values from table based on date range criteria

12. Lookup based on date range in unlinked table

 

 
Powered by phpBB® Forum Software