Skip to Content

datetime to date in prompt

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • 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.

    Brian

    Add comment
    10|10000 characters needed characters exceeded

    • 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

  • 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?

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded