Skip to Content

datetime to date in prompt

Apr 12, 2017 at 08:41 PM


avatar image

Hello All,

I am creating a parameter based on order_date to prompt as start and end date. Crystal reports is based on stored procedure and order date has timestamp. But user only wants to select date without timestamp.

I am assuming I have to make change to SP where order_date has to be converted to date?

or any other way to do in crystal reports ?



10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Brian Dong Apr 12, 2017 at 09:33 PM

Hi Pali,

If order_date is a parameter in the Stored Procedure, then yes, you need to make sure the parameter in the report matches the datatype of the parameter in the Stored Procedure.

If order_date is not a parameter and you are adding the filter in the Record Selection Formula, then you can convert the Crystal parameters to DateTime in the formula.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Brian,

The order date is a parameter...i used it in record filter ...for start and end date based on order_date. The data type in DB and stored proc is Datetime. Should I convert the datetime in stored procedure to display only date ? wont it still be a datetime object in crystal ?




The other possibility is to change report to use a Command and then execute the SP in the command.

You can then create date parameters in the command dialog box and then in your execute command cast them as datetime.


Abhilash Kumar
Apr 13, 2017 at 07:39 AM

Hi Pali,

There is another way to do this in CR via Subreports.

It depends on the significance of the timestamp though. Does the field store actual transaction times or just 00:00:00?


10 |10000 characters needed characters left characters exceeded