cancel
Showing results for 
Search instead for 
Did you mean: 

Date Picker - format output

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

thanks Murtuza.

Answers (1)

Answers (1)

Former Member
0 Kudos

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");