cancel
Showing results for 
Search instead for 
Did you mean: 

US time format not consistent with Windows XP

Former Member
0 Kudos

The en-US date time format for date/time fields in Crystal Reports 2008 is not consistent with the regional settings of Windows XP.

The regional settings indicate the format is:

1/2/2008 2:45:26 PM

The format used by Crystal Reports is:

1/2/2008 2:45:26PM

The difference is the space between the seconds and the AM/PM designator and three spaces between the date and time (which gets truncated in the forum post).

I made a test application and there are numerous cultures which use AM/PM designators which fail. Below is a list of some which fail (I removed the triple spaces between date and time for this test, so this only shows the AM/PM designator issue):

Problem with English (Australia)

Expected: 1/01/2008 12:00:00 AM, Actual: 1/01/2008 12:00:00AM

Problem with English (Belize)

Expected: 01/01/2008 12:00:00 AM, Actual: 01/01/2008 12:00:00AM

Problem with English (Canada)

Expected: 01/01/2008 12:00:00 AM, Actual: 01/01/2008 12:00:00AM

Problem with English (New Zealand)

Expected: 1/01/2008 12:00:00 a.m., Actual: 1/01/2008 12:00:00a.m.

Problem with English (United States)

Expected: 1/1/2008 12:00:00 AM, Actual: 1/1/2008 12:00:00AM

The test application works by exporting to HTML and then parsing the HTML, but I've confirmed (by running the report) that at least the US does, in fact, exhibit this problem in the ReportViewer control.

Edited by: Sidney Forcier on Oct 21, 2008 2:52 PM

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Please re-post if this is still an issue to the .NET Development - Crystal Reports Forum or purchase a case and have a dedicated support engineer work with you directly

Former Member
0 Kudos

Hi Sidney

1) In File>>Options>>Fields>>Date and Time go to Date and Time tab.

2) Click on Customize.A Custom Style dialogue box will appear.In the Separator drop down ensure that there is no space.

3) This could help in minimizing the space between the end of date and start of time.

As far as the gap between the time and AM/PM is concerned user cannot modify it directly unless a formula is written to introduce space.It is by design.

Also, a quote from your thread says:

"The test application works by exporting to HTML and then parsing the HTML, but I've confirmed (by running the report) that at least the US does, in fact, exhibit this problem in the ReportViewer control."

Does this mean that you are viewing the report in any other application than crystal reports stand-alone application.

Thanks

Former Member
0 Kudos

"The test application works by exporting to HTML and then parsing the HTML, but I've confirmed (by running the report) that at least the US does, in fact, exhibit this problem in the ReportViewer control."

Does this mean that you are viewing the report in any other application than crystal reports stand-alone application.

This report will be viewed via a ReportViewer control embedded within an application (C# .NET). The "test application" I refer to is actually a unit test (no UI), and I have a small "dummy" winForm app with just a ReportViewer control on it to confirm with my own eyes that which the unit test reports.

Former Member
0 Kudos

Hi

While answering the question I had assumed that you were viewing the report in a crystal reports stand-alone application.

However, it seems that you are viewing it through the CR which is embedded in .NET.

I think the .NET community could be able to suggest some solution on this.

Please post this thread in the "Business Objects SDK Application Development" forum.

Thanks