Bug Report T859727
Visible to All Users

cxDateEdit - The "Could not convert variant of type (UnicodeString) into type (Date)" error occurs on saving a date selected from the drop-down calendar if the Properties.EditFormat property value includes ddd or dddd

created 5 years ago

We have a customer that uses the following Short Date format: ddd/MM/dd/yy

When he clicks the Now button in a TcxDateEdit control, an unknown exception is thrown. The editor shows both Date and Time and has InputKind of Standard. If I change the InputKind to RegExpr the error disappears, but the underlying value is still not the proper one.

Show previous comments (1)

    Hi, Paulo,

    I mean the system short date format, not the control one.

    You need to go to Control Panel\Clock and Region > Change date, time, or number format > Additional settings > Date.
    Then change the Short date value to: ddd/MM/dd/yy

    Now go to your demos, launch the ExpressEditors Features demo, go to Date Picker, select Date And Time in Kind, check Show Now Button, and then click the Now button in the editor. It will only set the date, but not the time. There is no way to add the time.

    You should be able to see the same behavior in the demo you've sent me too.

    In my app it crashes, but that might be due to some other properties set.

    But in all cases, it does not work as expected.

    DevExpress Support Team 5 years ago

      Thank you for your clarification. I have reproduced the OLE conversion exception with that Short Date Time format. It may take us some time to find an appropriate solution.

      May I make the content of this ticket visible to other visitors of our site? When we find a solution, it may be useful to them.

        Yes, feel free to make it public.

        Answers approved by DevExpress Support

        created 5 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          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.