Bug Report B203525
Visible to All Users

TFormatSettings.TranslateDateFormat returns an incorrect result with Delphi XE

created 14 years ago

When using symbol inside apostrophe delimited text, part of the date string, on display the symbol is being changed to "/".
Steps to Reproduce:
How to reproduce the problem:

  1. Go to Control Panel -> Regional Settings -> Date Format
  2. Set Short Format to
    dd.MM.yyyy 'y.'
  3. Create New Project and place on the form TcxDateEdit component
  4. Run and set date to 27.07.2011
    Actual Results:
    the component display data 27.07.2011 y/
    Expected Results:
    the component must display data 27.07.2011 y.
Comments (2)
DS DS
Dimitar Selenski 14 years ago

    When we install Windows with Bulgarian Regional Settings the default date format setting is dd.mm.yyyy 'г.'

    DevExpress Support Team 14 years ago

      Hello Dimitar,
      We have examined this problem, but have found that it occurs due to an issue in the Embarcadero Delphi IDE. Please refer to the following bug report:
        http://qc.embarcadero.com/wc/qcmain.aspx?d=96844
      As a temporary workaround, please use the following code:

      Delphi
      uses ... cxFormats, cxDateUtils, ... initialization FormatSettings.ShortDateFormat := cxGetLocalShortDateFormat; cxFormatController.GetFormats;

      Thanks,
      Valdemar

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.