Skip to Content
author's profile photo Former Member
Former Member

Date Picker - format output

Hi

I have a standard date picker linked to an input field and when I select a date it is displayed in the format yyyy-mm-dd. Is there any way I can change this to another format, say yyyy/mm/dd? This doesn't seem to be linked to my PC regional settings.

thanks in advance

Anton Kruse

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 10:00 AM

    Hi Anton,

    Yes, you can change the format of the date as per your requirement.

    Create a simple type of type Date and under representaion tab for the simple type specify the format as yyyy/MM/dd

    Now bind this simple type to your context that you have binded to your UI element.

    Regards,

    Murtuza

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 09:59 AM

    The date format yyyy-mm-dd.populated into your input field when you select a date from the date picker is based on your system setting.

    If the date format showed in your System tray is yyyy-mm-dd., the same format will appear in the input field as well.

    Currently your system setting might be in some format. Hence it is showing in yyyy-mm-dd. format.

    Try changing this to English(UnitedKingdom) format. Then it should display dd/mm/yyyy format.

    To change the setting Go to

    Start Menu => Control Panel => Regional and Language settings. Here you select English(unitedKingdom). Now you can notice your system as well as your application displaying in DD/MM/YYYY format

    OR

    ISimpleTypeModifiable simp2 = dateinfo.getModifiableSimpleType();

    simp2.setFormat("yyyy/mm/dd");

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.