cancel
Showing results for 
Search instead for 
Did you mean: 

Date Format

0 Kudos

Hi,

I want to change the default date format to dd/MM/yyyy. I searched the forum and got the answer in this thread

However i have one problem with the solution above. When my application gets loaded i get the date in dd/MM/yyyy format which is what i want. But when i select a date from the Date Picker the date again changes to MM/dd/yyyy format.

Am not sure why this is taking place.

Please give your suggestions.

Regards

Sidharth

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

If you see the source code

<link rel='stylesheet' type='text/css' href='http://XXXX:50000/webdynpro/resources/sap.com/tcwddispwda/global/SSR/themes/myThemeDesign/ur/ur_ie6.css'>

<script type="text/javascript" src="js/sapWdSsr_ie6.js"></script>

<script type="text/javascript" src="js/sapUrMapi_ie6.js"></script>

<script type="text/javascript" src="js/languages/urMessageBundle_en.js"></script>

<script type="text/javascript">

ur_system = ;

................

So the date format here plays a major roll. so probably to check rought you take change the date format to 1 in the javascript in the server and try ..........

Hope this helps and solves your problem

Cheers,

Kumar

Former Member
0 Kudos

dateformat=2 corresponds to "MM/dd/yyyy".

If the date picker returns a date with another format, it is a bug.

Which runtime version (SP) are you using?

Armin

0 Kudos

Hi Armin,

I am using SP9 version. I didnt get what you meant by dateformat=2 is MM/dd/yyyy format.

As i have written because of the simple type when my application gets loaded i get date in the format dd/MM/yyyy format. But when i select any date from the date picker the input field gets populated with the date in the default format i.e. MM/dd/yyyy.

Why such a behaviour.

Regards

Sidharth

Former Member
0 Kudos

The date format MM/dd/yyyy 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 dd/mm/yyyy, the same format will appear in the input field as well. Currently your system setting might be in English(UnitedStates) format. Hence it is showing in mm/dd/yyyy 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.

Hope this clarifies your question.

Former Member
0 Kudos

Forgot to mention it comes from the javascript format setting .......

Former Member
0 Kudos

Hi Sidharth,

Is it you R3 has the format of MM/dd/YYYY...., When i was doing BSP i have seen somewhere the date format is getting set based on a Table Field Value. So your date format changes depends on that. I am sorry right now i don't remember where exactly i have seen that. Will try to identify and tell u.

Regards,

Kumar

0 Kudos

Hi,

Any suggestions would be most helpful.

Regards

Sidharth