Skip to Content
avatar image
Former Member

US time format not consistent with Windows XP

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Oct 31, 2008 at 08:24 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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

  • Nov 06, 2009 at 08:31 PM

    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

    Add comment
    10|10000 characters needed characters exceeded