cancel
Showing results for 
Search instead for 
Did you mean: 

datetime to date in prompt

former_member539471
Participant
0 Kudos

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 ?

Thanks

pali

Accepted Solutions (0)

Answers (2)

Answers (2)

abhilash_kumar
Active Contributor
0 Kudos

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?

-Abhilash

former_member292966
Active Contributor
0 Kudos

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.

Brian

former_member539471
Participant
0 Kudos

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 ?

Thanks,

pali

Former Member
0 Kudos

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.

Ian