Filter dates between VB 6.0 and CR 6.0 from *.qry 
Author Message
 Filter dates between VB 6.0 and CR 6.0 from *.qry

Hi guys.
I have a problem with dates in CR.
My reports are built with Crystal Query designer
when I insert the fields on my report the field change Datetime to a string.
I use DTSToDate(DateTimeString) function to change that string field to
date.

The problem is that when I ask from VB code to recover all the registers
between two dates, as follows,
date1>= date(1999,10,10)
date2<=date(1999,11,11)
the registers which date is 1999,11,11 doesnt appear in my report.

thanks in advance

- Quique -



Fri, 28 Dec 2001 03:00:00 GMT  
 Filter dates between VB 6.0 and CR 6.0 from *.qry
Why are you using Crystal Formulas at all?

Use ParameterFields... in your SQL Queries {?ParamName}.
Set DiscardSavedData property = False in VB code.

What database server you using?  I'm using Oracle and give you an example of how
I'm comparing a Date field to a Date type ParameterField in my SQL Query SQL
code.

Quote:

>Hi guys.
>I have a problem with dates in CR.
>My reports are built with Crystal Query designer
>when I insert the fields on my report the field change Datetime to a string.
>I use DTSToDate(DateTimeString) function to change that string field to
>date.

>The problem is that when I ask from VB code to recover all the registers
>between two dates, as follows,
>date1>= date(1999,10,10)
>date2<=date(1999,11,11)
>the registers which date is 1999,11,11 doesnt appear in my report.

>thanks in advance

>- Quique -

John Ellard

1-512-206-4542


Fri, 28 Dec 2001 03:00:00 GMT  
 Filter dates between VB 6.0 and CR 6.0 from *.qry

Quique,

You probably have datetime value in your database, and then compare it with the
date.  In this case the comparison should be
     date_to_check  < Next_after_to_date

Hope this helps

Boris




cc:    (bcc: Boris Mandel/New Jersey/ACMC)
Subject:  Filter dates between VB 6.0 and CR 6.0 from *.qry

 Message from the Deja.com forum:
 microsoft.public.vb.crystal
 Your subscription is set to individual email delivery
 oO---------------------------------------------------------Oo
 SPONSOR
 No gimmicks - just great value!  Long distance with Qwest.
 State-to-state calls 9c cents a minute, all day, every day with NO
 monthly fee.  Sign up today and start experiencing the difference.
 http://www.deja.com/jump/http://www.qhome.net/dejanews/dj01/offer.jhtml

 oO---------------------------------------------------------Oo

Hi guys.
I have a problem with dates in CR.
My reports are built with Crystal Query designer
when I insert the fields on my report the field change Datetime to a string.
I use DTSToDate(DateTimeString) function to change that string field to
date.

The problem is that when I ask from VB code to recover all the registers
between two dates, as follows,
date1>= date(1999,10,10)
date2<=date(1999,11,11)
the registers which date is 1999,11,11 doesnt appear in my report.

thanks in advance

- Quique -

 _____________________________________________________________
 Deja.com: Share what you know. Learn what you don't.
 http://www.deja.com/
 * To modify or remove your subscription, go to
 http://www.deja.com/edit_sub.xp?group=microsoft.public.vb.crystal
 * Read this thread at
 http://www.deja.com/thread/%3CeYQy%23oFz%23GA.263%40cppssbbsa05%3E



Sun, 30 Dec 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. VB 6.0 : CR 7.0 - [Cancel] CR

2. Date Time Field in CR 6.0

3. CR 6.0 for btrieve - apply date format to field

4. VB 6.0 - Visual FoxPro 6.0 Tables and VB

5. CR 6.0 and CR 7.0

6. CR 6.0 Report upgraded to CR 7.0 report has formatting issues

7. Upgraded CR 6.0 Report to CR 7.0 got formatting issues

8. Upgrading from CR 6.0 to CR 7.0

9. Need Help Filtering data with VB 6.0 and Crystal 7.0

10. ADSI filters with VB 6.0?

11. VB 6.0 reports vs. Crystal 6.0

12. VB 6.0 and IE 6.0 system OCXs and DLLs incompatibilities

 

 
Powered by phpBB® Forum Software