Question

I've got a couple of Crystal Reports XI Release 2 reports that are part of a COM InteropForm's app, that is included in a VB6 app. Both of these reports display a date from a DateTime field in a SQL Server database. They've worked fine for the last 3 years or so.

Now I've been tasked with showing the time portion of the data. I've got both of the .rpt files opened in the CR 11 R 2 designer, and am looking at the Format Editor. Under the Date tab I don't see anything which will display both the date and time of the data. (Unless it is the System Default Long Format, but I'm not sure of what that is on each of the users' machines. In fact, frankly I don't know how to check that on my own machine, which is a Windows XP Pro machine with SP3 installed.) Anyway, I've taken a look under the Custom Style, but again I don't see anything there which will allow me to display the time portion of the DateTime field from the database. How do I display both date and time, from the DateTime field in the database?

Was it helpful?

Solution

You should see quite a few options. If your view looks anything like this attached picture, then you're good to go.

If you only see a bunch of formats for numbers, then the date is not stored in the correct format. This is easily fixed by making a custom formula converting the field to a datetime and then displaying that new formula field instead of the original.

Format Editor

OTHER TIPS

There's one selection in Report Options (at least for CR9, should be in CR XI too), where you can choose, how to treat DateTime fields - Date, Time or DateTime. Select DateTime from there and re-check your fields formatting.

Warning - you can't revert that value to Date afterwards :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top