on 09-11-2007 10:48 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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");
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.