Cannot pass date parameter in Crystal report 9

TeknikDev
TeknikDev used Ask the Experts™
on
I keep getting this error when I try to create a data set in Crystal Report 9.

I go to Database ExpertAdd Command and then type in the syntax below and was prompted with incorrect error.

This is a date field, with no time stamp.

Anyone know how to get pass this?! Thanks!
exec GetRecentData '{?@TransDate}'

Open in new window

error.jpg
date.jpg
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
Try it without the ' '.  The ' ' make SQL treat it as a string

mlmcc

Author

Commented:
Aren't dates require ''?
Senior Consultant
Most Valuable Expert 2011
Top Expert 2013
Commented:
Shouldn't if it is a true date datatype.  Did you try it?

I generally passed them in the SQL string using the DATE function.

exec GetRecentData  DATE({?@TransDate})

Where is this being run?

mlmcc
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial