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!

parameter passing as date

Status
Not open for further replies.

jadoogar

Programmer
Oct 23, 2003
61
IN
Hi,
I want to get a report genreated from a table
between two dates say mdt1,mdt2
In crystal report the parameter fields are only
text no?

I tried the record selection formula as
({applicant.preparedat} >= date(val(right({?mdt1},4)),val(mid({?mdt1},4,2)),val(left({?mdt1},2))) and {applicant.preparedat} <= date(vaL(right({?mdt2},4)),val(mid({?mdt2},4,2)),val(left({?mdt2},2))))


where mdt1, mdt2 are parameters passed from VB to
crystal reports, applicant is table, preparedat is a field
its struc is datetime format
but the filtering is not getting correctly

Can anyone suggest a better approach please
 
Is this a question or a statement?

&quot;In crystal report the parameter fields are only
text no?&quot;

I'm not even sure what that means...if you're stating that Crystal only has string type parameters, that's incorrect.

Use date type parameters.

As for filtering being incorrect, try posting specifics rather than &quot;it's wrong&quot;

-k

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top