Link to home
Start Free TrialLog in
Avatar of hlevine5
hlevine5

asked on

Using SQLServer DateTime as parameters in Crystal Reports

When the parameter is prompted
It wants date in the following format mm/dd/yyyy hh:mm:ss AM or PM

How do I correctly set this up
I can address it in the SQL Server table I create or on the Crystal report side


Avatar of chapmandew
chapmandew
Flag of United States of America image

It probably notices the DataTime param and wants an exact format for it.  You can try entering '01/01/2008' in the report...it will probaby work for you that way.  If not, then you can change the stored procedure to accept a varchar(10) as the date, and handle it in your proc that way.  You can cast the string '01/02/2008' as a date like this:  CAST('01/01/2008' as DATETIME).  Hope this helps.
Tim
Avatar of hlevine5
hlevine5

ASKER

Let me test
So Set the field in SQL server as text and then extract using the CAST?

ASKER CERTIFIED SOLUTION
Avatar of chapmandew
chapmandew
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thankk you solution works fine