cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Datetime To Date Parameter issue...

Former Member
0 Likes
3,692

Post Author: ram323

CA Forum: General

How can I convert the parameter from Datetime data type to Only Date Parameter so that everytime the parameter prompt window pops-up, the user will only input the Date and not seeing the Time on the parameter prompt window..I am using Crystal Reports XI..and my stored procedure uses DateTime data type....Need Help!!! a step by step procedure will be greatly appreciated.....Thanks much....

View Entire Topic
Former Member
0 Likes

Post Author: Esc2Xtc

CA Forum: General

Hi v361,

Many thanks for your reply.

However, this solution does not work for a crystal report that is linked to a stored procedure that has a datetime parameter. When creating a report, while linking it to a stored procedure from which you can extract data, the report DISABLES the datatype (along with many other properties) of this parameter field. This results in the developer not being able to change it to a date but having to stick with this datetime prompt.

Here is an example for you to try (replace the <table> and <Date> below with your respective values:

ALTER PROCEDURE &#91;dbo&#93;.&#91;sp_TestX&#93; (@param_date smalldatetime)ASBEGINSELECT * FROM <table> WHERE <Date> = @param_dateEND GO

Now create a new report linked to this stored procedure. Crystal Reports will hardcode the @param_date paramete into your report without waiting for you to do it. Try to edit the datatype of this field? I work on Crystal Reports Version 10. Let me know if you are able to do this?