Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date param hitting date/time field 1

Status
Not open for further replies.

MaumeeScott

Technical User
Jan 29, 2004
25
US
I have date parameters (?StartDate and ?EndDate) and they are being run against a date/time field. The selection criteria looks like:

Date({date/time field}) in ?StartDate and ?EndDate

This works fine except that it takes forever to run and no matter what date range in insert the report looks at every record. When I remove the Date() function it is much faster. I would like for my users not to have to deal with a time-stamp on the parameter if possible. Any ideas?
 
What about:

Code:
{date/time field} in datetime({?StartDate}, time(0,0,0)) to datetime({?EndDate}, time(23,59,59))
 
What you saw happening is that the SQL wasn't being passed to the database.

Make sure that anything you reference in the record selection is also represented in the Databse->Show SQL Query.

I have a FAQ on this topic:

faq767-3825

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top