- Calendar date fills in the time with the current time, and not midnight (00:00:00)
- When selecting a date for a date time parameter in Crystal Reports, it set the time to the current time.
- When selecting a date value from the calendar in Crystal Reports, it automatically add the current time to the date instead of the expected time of 00:00:00
- In Crystal Reports XI R2, and below, the default time for a date time parameter was midnight, and not the current time, how to change the behavior of Crystal Reports 2008 and above to return midnight, instead of the current time?
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
Reproducing the Issue
- In Crystal Reports, create a report off any data source.
- Add a Date Time parameter to the report.
- When refreshing the report, and prompted by the Date Time parameter, select a date from the calendar.
- Notice, it will automatically append the current time instead of the midnight, 00:00:00, to the date.
- This is a new enhancement in Crystal Reports 2008 and above, that allows you to enter the time, in the box below the date picker. And by default, the current time is entered.
- To workaround displaying the current time, set a default date and time to midnight for the Date Time parameter.
The following steps will override the default current time, and set the parameter's time to 00:00:00, for all future report refreshes.
- In Crystal Reports 2008 and above, open your report.
- Edit the Date Time parameter.
- Change the default value option from: (blank space) to: 01/01/2016 00:00:00
- Save the report.
Now, when refreshing the report, it will display a default date time value, and when selecting a date in the calendar, the time portion will always be midnight.
date prompt, datetime prompt, currenttime , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem