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

Datetime To Date Parameter issue...

Former Member
0 Likes
3,698

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: Archmage

CA Forum: General

You shouldn't be having this issue as I also have CR11 and work with MS SQL05. However,I did remember having this issue with an old report several years ago and the solution can be handled on the stored procedure side.

Simple example:

create proc XXXX (@date datetime) as

set @date=cast(convert(varchar, @date,101) as datetime) --- drop time portion

select * from Table.A where date=@date

hope that helps.